C Programming Tutorial

 
 
 
 

Image

#include <stdio.h>
#include <stdlib.h>
#include <conio.h>

void main(){
int i,cnt=0,rnd;
clrscr();
while(1){
     rnd=random(100);
     if(rnd>50 && rnd<100){
     printf(\"\\nRandom No [%d]    :  %d \",cnt+1,rnd);
     cnt++;
     }
     if(cnt==10)
    break;
}
getch();
}

 
 
Didn't find what you were looking for? Find more on Program to generate random numbers