scanf return test

This commit is contained in:
k0rrluna 2025-02-04 09:09:04 +03:00
parent 8e36a1a11c
commit 4e7fa1b23f
2 changed files with 4 additions and 1 deletions

View File

@ -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.