moved files to new location

This commit is contained in:
2026-09-24 22:26:41 +02:00
parent a97d1f240b
commit 230f38ebf5
5 changed files with 0 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
#include <stdio.h>
#include <stdlib.h>
/* Find the MIN MAX value of three values */
int main()
{
int a, b, c;
int max, min;
printf("Enter first nubmer: ");
scanf("%d", &a);
printf("Enter second nubmer: ");
scanf("%d", &b);
printf("Enter third nubmer: ");
scanf("%d", &c);
if (a < b)
{
max = b;
min = a;
}
if (max < c)
max = c;
if (c < min)
min = c;
printf("MAXIMUM between 3 numbers = %d\n", max);
printf("MINIMUM between 3 numbers = %d\n", min);
return 0;
}
+45
View File
@@ -0,0 +1,45 @@
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a, b, c;
printf("Pleas enter 3 values: \n");
scanf("%d %d %d", &a, &b, &c);
printf("a = %d b = %d c = %d\n", a, b, c);
if (a < b && a < c)
{
printf("a = %d -> Minimum\n", a);
}
if (b < a && b < c)
{
printf("b = %d -> Minimum\n", b);
}
if (c < a && c < b)
{
printf("c = %d -> Minimum\n", c);
}
if (a > b && a > c)
{
printf("a = %d -> Maximum\n", a);
}
if (b > a && b > c)
{
printf("b = %d -> Maximum\n", b);
}
if (c > a && c > b)
{
printf("c = %d -> Maxmum\n", c);
}
return 0;
}
+29
View File
@@ -0,0 +1,29 @@
#include <stdio.h>
#include <stdlib.h>
/* Finding if a given number is EVEN or ODD*/
int main()
{
int num;
printf("\n");
printf("This programm checks if a number is even or odd.\n");
printf("Please enter a number: ");
scanf("%d", &num);
if (num % 2 == 0)
{
printf("%d - The number is EVEN\n", num);
}
else
{
printf("%d - The number is ODD\n", num);
}
printf("\n");
return 0;
}
+35
View File
@@ -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;
}
+23
View File
@@ -0,0 +1,23 @@
#include <stdio.h>
#include <stdlib.h>
int main()
{
int grade;
printf("Enter your grade: ");
scanf("%d", &grade);
printf("Grade: %d\n", grade);
if (grade >= 80)
printf("Exellent Job!\n");
if (grade >= 60 && grade < 80)
printf("Not bad ...\n");
if (grade < 60)
printf("Oh... You didn't pass.\n");
return 0;
}