Thread: C programming
View Single Post
Old 11-20-05, 10:29 PM   #2
supra
2JZ powered
 
supra's Avatar
 
Join Date: Dec 2004
Location: Aus
Posts: 1,321
Send a message via MSN to supra
Default Re: C programming

i havent programmed C in a long long time now but maybe something like this?


int num[19];
int x;

void main()
{
for (x = 0; x < 20; x++)
{
printf("please enter value for %d : ", i);
scanf("%d", &num[x]);

if (num[x] < 10 || num[x] > 100)
{
printf("value must be between 10-100");
printf("please enter value for %d : ", i);
scanf("%d", &num[x]);
}
else
{
//for loop to go through num array to check for duplicates
//soz, too lazy to code the rest lol
}

}
}
__________________
supra is offline