Skip to content
This repository was archived by the owner on Jul 13, 2025. It is now read-only.

Commit 24e3289

Browse files
C
1 parent 3b167c8 commit 24e3289

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+433
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Convert from Celsius to Kelvin
2+
3+
#include<stdio.h>
4+
int main()
5+
{
6+
float K, C;
7+
printf("Enter your temperature in Celsius: ");
8+
scanf("%f", &C);
9+
10+
K = C + 273;
11+
printf("The temperature in Kelvin Scale: %.2lf", K);
12+
13+
return 0;
14+
}
383 KB
Binary file not shown.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Convert from Kelvin to Celsius
2+
3+
#include<stdio.h>
4+
int main()
5+
{
6+
float K, C;
7+
printf("Enter your temperature in Kelvin: ");
8+
scanf("%f", &K);
9+
10+
C = K - 273;
11+
printf("The temperature in Celsius Scale: %.2lf", C);
12+
13+
return 0;
14+
}
383 KB
Binary file not shown.

Arithmetic Problems/average.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Find average marks of the 6 Subjects
2+
3+
#include<stdio.h>
4+
int main()
5+
{
6+
float s1, s2, s3, s4, s5, s6, sum, total, average;
7+
total = 600;
8+
printf("Please enter the number of subjects: ");
9+
scanf("%f %f %f %f %f %f", &s1, &s2, &s3, &s4, &s5, &s6);
10+
11+
if (s1, s2, s3, s4, s5, s6 > 100)
12+
{
13+
printf("Please enter the valid marks");
14+
}
15+
else
16+
{
17+
sum = (s1 + s2 + s3 + s4 + s5 + s6);
18+
average = (sum * 100) / total;
19+
printf("Average mark of these 6 subjects: %.2lf\n", average);
20+
}
21+
return 0;
22+
}

Arithmetic Problems/average.exe

383 KB
Binary file not shown.

Arithmetic Problems/avg.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//C Program to Find the Average of Three Numbers
2+
3+
#include<stdio.h>
4+
void main()
5+
{
6+
int x, y, z; //Declaring Three Variables
7+
float avg;
8+
printf("Enter Three Numbers : \n");
9+
scanf("%d %d %d",&x, &y, &z); //Input Numbers
10+
11+
avg=(x+y+z)/3.0; //Calculating Average of three numbers
12+
printf("Average of Three Numebers is : %f", avg);
13+
14+
return 0;
15+
}

Arithmetic Problems/avg.exe

383 KB
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Converting temperature from Celsius to Fahrenheit scale.
2+
3+
#include<stdio.h>
4+
int main()
5+
{
6+
/*
7+
Fahrenheit = ((9/5) * Celsius) + 32; or you can use 1.8 in place of 9/5
8+
*/
9+
float C, F;
10+
printf("Enter temperature in Celsius : \n");
11+
scanf("%f", &C);
12+
13+
F = (1.8 * C) + 32;
14+
printf("Temperature in Fahrenheit: %f\n", F);
15+
16+
return (0);
17+
}
Binary file not shown.

0 commit comments

Comments
 (0)