Hey guys & girls,
I've got a problem, within an assignment of mine - i have to write up a function that counts the number of integers that have been input by the user, and if an integer has been read more than once, then print "Invalid".
So far, I have:
any suggestions?Code:#include <stdio.h> void count_int() { int x=0; int count=0; printf("Enter several integer values:\n"); scanf("%d", &x); /*not sure what to put in here so it can count the number of integers it has read.*/ }
Thanks,
Jason =)