-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProblem_Set_14.c
More file actions
33 lines (26 loc) · 802 Bytes
/
Problem_Set_14.c
File metadata and controls
33 lines (26 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Write a function to convert celsius to fahrenheit.
// fahrenhite(f) = c * (9.0/5.0) + 32
/* #include<stdio.h>
float convertTemp(float celcius );
int main(){
float fahren = convertTemp(37);
printf("Fahrenhite is : %.2f",fahren);
return 0;
}
float convertTemp(float Celsius){
float fahren = Celsius * (9.0/5.0) + 32.00;
return fahren;
}*/
// Write a function to calculate Percentage of a student from marks in Science,Math & Biology.
/*#include<stdio.h>
int calcPercentage( int science,int math , int biology);
int main(){
int science = 98;
int math = 90;
int biology = 94;
printf("Percentage is : %d ",calcPercentage(science,math,biology));
return 0;
}
int calcPercentage( int science,int math , int biology){
return ((science+math+biology)/3);
}*/