Farenheit Celsius Calculator

#include <stdio.h>  
 void celsiusToFarenHeit(int celsius);  
 void farenheitToCelsius(int farenheit);  
 void main()  
 {  
   /*  
   c/5=f-32/9  
   */  
   int max = 300;  
   int index = 0;  
   int increment = 20;  
   for (index = 0; index <= max; index += increment)  
   {  
     celsiusToFarenHeit(index);  
     farenheitToCelsius(index);  
   }  
 }  
 void celsiusToFarenHeit(int celsius)  
 {  
   float farenheit = (9 * (celsius / 5)) + 32;  
   printf("Celsius : %d => Farenheit : %6.2f\n", celsius, farenheit);  
 }  
 void farenheitToCelsius(int farenheit)  
 {  
   float celsius = (5 * ((farenheit - 32) / 9));  
   printf("Farenheit : %d => Celsius : %6.2f\n", farenheit, celsius);  
 }  

Comments

  1. Ukraine is one of the best outsourcing locations for softwrae development, and Java is one of its core technologies. I believe this article will provide you with valuable insights and help you to find hire blockchain developers.

    ReplyDelete

Post a Comment

Popular posts from this blog

readchar - 2 ways