Advertisement
Guest User

Untitled

a guest
May 31st, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. #include <stdlib.h>
  4. #include <math.h>
  5.  
  6. int main(void){
  7.    
  8.     int a=0,b=0,c=0,i;
  9.    
  10.     srand(time(NULL));
  11.    
  12.     a=rand() %33;
  13.     if(a==0)a++;
  14.    
  15.     b=rand() %23;
  16.     if(b==0)b++;
  17.     c=rand() %23;
  18.     if(c==0)c++;
  19.    
  20.     printf("A:%d\n",a);
  21.     printf("B:%d\n",b);
  22.     printf("C:%d\n",c);
  23.    
  24.    
  25.    
  26.    
  27.     getch();
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement