challange 96 added
This commit is contained in:
+2
-2
@@ -16,11 +16,11 @@ int main()
|
|||||||
|
|
||||||
if (num % 2 == 0)
|
if (num % 2 == 0)
|
||||||
{
|
{
|
||||||
printf("The number is EVEN\n");
|
printf("%d - The number is EVEN\n", num);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("The number is ODD\n");
|
printf("%d - The number is ODD\n", num);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
/* Finding MAX and MIN between 2 numbers */
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
|
||||||
|
float num1, num2;
|
||||||
|
|
||||||
|
printf("Finding MAX and MIN between 2 number\n");
|
||||||
|
|
||||||
|
printf("Please enter your first float number: ");
|
||||||
|
scanf("%f", &num1);
|
||||||
|
|
||||||
|
printf("Please enter your second float number: ");
|
||||||
|
scanf("%f", &num2);
|
||||||
|
|
||||||
|
if (num1 < num2)
|
||||||
|
{
|
||||||
|
printf("%.3f - num1 is the MIN-number.\n", num1);
|
||||||
|
printf("%.3f - num2 is the MAX-number.\n", num2);
|
||||||
|
}
|
||||||
|
else if (num1 > num2)
|
||||||
|
{
|
||||||
|
printf("%.3f - num1 is the MAX-number.\n", num1);
|
||||||
|
printf("%.3f - num2 is the MIN-number.\n", num2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("Both numbers are equal: %.3f = %.3f \n", num1, num2);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user