Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
FahrenheitToCelcius
//gcc 5.4.0 /* Program for conversion of celsius to fahrenheit*/ #include <stdio.h> int main(void) { int fahr,cel,lower,upper,step; /* Declaration for variables such as fahr for fahrenheit, cel for celcius, lower for lower bound of the loop, upper for upper bound of the loop and step represents the stepping variable */ lower = 0; //assignment of the lower variable upper = 300; //assignment of the upper variable step = 20; //assignment of the step variable fahr = lower; //initialize farhenheit variable with starting point while(fahr <= upper) { cel = 5 * (fahr - 32) / 9; //formula for converting farhenheit into celcius printf("%d\t %d\n",fahr,cel); //printing the values of fahrenheit and celcius fahr = fahr + step; //incrementing fahrenheit variable by stepping variable } return 0; //return on successful execution of the program }
run
|
edit
|
history
|
help
0
QuestResp
time clock and day count through second by user input (ratneshgujarathi)
th
a3 commented
scanf and integer manipulation
C programming example for a Person struct and typedef (from ECE 2534)
TeleBook
recursive
SUMALE UNO
Lab 7 v1.0