SHARE
TWEET

Untitled

a guest Oct 14th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.   int n, i,  c, a = 1;
  6.  
  7.   printf("Zadajte pocet riadkov od 1 do 15: ");
  8.   scanf("%d", &n);
  9.  
  10.   if(n<1 || n>15){
  11.     printf("Cislo nieje z daneho intervalu");
  12.     return 0;
  13.   }
  14.  
  15.   for (i = 1; i <= n; i++)
  16.   {
  17.     for (c = 1; c <= i; c++)
  18.     {
  19.       printf("%d ",a);
  20.       a++;
  21.     }
  22.     printf("\n");
  23.   }
  24. return 0;
  25.  
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top