scanf return test
This commit is contained in:
parent
8e36a1a11c
commit
4e7fa1b23f
@ -3,11 +3,14 @@
|
||||
int main (void) {
|
||||
int i = 0, final = 0, mult = 1;
|
||||
puts("Enter 4 digit integer:");
|
||||
scanf("%d", &i);
|
||||
int intC = scanf("%d", &i);
|
||||
|
||||
if (i / 1000 >= 10) {
|
||||
puts("More than 4 digit");
|
||||
return 1;
|
||||
}else if (intC != 1) {
|
||||
puts("Not an Integer!");
|
||||
return 1;
|
||||
}
|
||||
|
||||
while (i > 0) {
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user