Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Reskova_Martina_4.ukol.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- int _tmain(int argc, _TCHAR* argv[])
- {
- //Ukol cislo 1
- int i, n;
- printf("Zadejte cislo: ");
- scanf("%d", &n);
- i = n;
- printf("Nasobky zadaneho cisla: ");
- while(i<=100)
- {
- printf("%d ", i);
- i = i + n;
- }
- //Ukol cislo 3
- int i, j, n;
- printf("Zadejte rozmer: ");
- scanf("%d", &n);
- printf("n");
- for (i = 0; i < n; i++)
- { //tiskne radky
- for (j = 0; j < n; j++)
- {
- if((i == 0) || (i == (n - 1)))
- {
- printf("*");
- }
- else
- {
- if((j == 0) || (j == (n - 1)))
- {
- printf("*");
- }
- else
- {
- printf(" ");
- }
- }
- }
- printf("n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement