Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5.  
  6. int main()
  7. {
  8.     int zadanie;
  9.     do
  10.     {
  11.     printf("0.Wyjscie\n1.Zadanie 1\nPodaj Liczbe: ");
  12.     scanf("%d",&zadanie);  
  13.     switch(zadanie)
  14.     {
  15.     case 0:
  16.         break;
  17.     case 1:
  18.         {
  19.        
  20.         int tab[100];
  21.         for(int i;i<100;i++)
  22.         {
  23.             if(i%5==0) tab[i]=0;
  24.             else tab[i]=rand()%1000;
  25.             printf("%d,",tab[i]);
  26.         }
  27.         }
  28.     break;
  29.     default:
  30.         printf("Zly numer Podaj nowy");
  31.         break;
  32.     }
  33.    
  34.     }while(zadanie!=0);
  35.     return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement