32 lines
561 B
C
32 lines
561 B
C
#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;
|
|
} |