Create IfThenCase.c

master
MD15 2020-04-10 12:17:38 +07:00 committed by GitHub
parent 3f6ff09960
commit 5dd7e5dbf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
#include <stdio.h>
int main () {
float number;
scanf("%f",&number);
if (number>=1 && number<10) {
printf("satuan\n");
}
else if (number<100) {
printf("puluhan\n");
}
else if (number<1000) {
printf("ratusan\n");
}
else if (number<10000) {
printf("ribuan\n");
}
else {
printf("puluhribuan\n");
}
}