C
This commit is contained in:
15
DeitelC/Chapter4/CelciusToFahrenheit.c
Normal file
15
DeitelC/Chapter4/CelciusToFahrenheit.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int CelciusConvert(int c) {
|
||||
int f;
|
||||
f = ((c*9)/5)+32;
|
||||
return f;
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
int c;
|
||||
int f;
|
||||
printf("%s\n", "Enter Celcius degree!");
|
||||
scanf("%d", &c);
|
||||
printf("%d %s %d",c, " Celcius equals to Fahrenheit: ", CelciusConvert(c));
|
||||
}
|
Reference in New Issue
Block a user