upd course
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int value;
|
||||
|
||||
int first, second, third;
|
||||
|
||||
printf("Geben Sie eine dreistellige Zahl ein: \n");
|
||||
scanf("%i", &value);
|
||||
|
||||
first = value / 100;
|
||||
printf("first: %i\n", first);
|
||||
|
||||
second = (value - first * 100) / 10;
|
||||
printf("second: %i\n", second);
|
||||
|
||||
third = (value - first * 100) - second * 10;
|
||||
printf("third: %i\n", third);
|
||||
|
||||
if (first < second && second < third)
|
||||
{
|
||||
printf("ASCENDING\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("NOT ASCENDING\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user