Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to write a code for random pick from 1-1000 numbers?
The output should contain the 10 numbers from the range
1-1000 which should pick randomly, ie ,for each time we run
the code we should get different outputs.

Answer Posted / dayquest

#include<stdio.h>
#include<stdlib.h>
#include<time.h>
void main()
{
int i;
randomize();
printf("\n Ten random numbers between 1 and 1000 are \n");
for(i=0;i<10;i++)
printf("%d ",random(1000)+1);
getch();
}

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define macros.

1234


Write the Program to reverse a string using pointers.

986


code for find determinent of amatrix

1931


How are Structure passing and returning implemented by the complier?

1128


What is integer constants?

1030


Why does the call char scanf work?

1170


Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1175


What is the acronym for ansi?

1012


Define the scope of static variables.

1077


How can I make it pause before closing the program output window?

1006


Distinguish between actual and formal arguments.

1023


What is the newline escape sequence?

1034


Is c is a low level language?

1085


What is the difference between malloc calloc and realloc in c?

1094


How can I insert or delete a line (or record) in the middle of a file?

991