C Program to calculate Celsius to Fahrenheit

Description

Get Celsius C from user and find Fahrenheit F
Sample Input 1:
33.44
Sample Output 1:
92.20

Solution

#include<stdio.h>

int main()

{
    
	double f,c;
	printf("Enter celsius:");
	scanf("%lf",&c);

	f=c*1.8+32;
	printf("Fahrenhiet:%.2lf",f);
    
	return 0;

}

Explanation

Get celsius c as input (using scanf statement)

Calculate Fahrenheit f using Formula f=1.8*c+32

print Fahrenheit f (using printf statement).



Interesting Pattern Programs: for more Patterns

Input:
5
Output:
*
**
***
****
*****
****
***
**
*Solution
Input:
5
Output:
    *
   ***
  *****
 *******
*********
 *******
  *****
   ***
    *Solution
Input:
5
Output:
*        *
**      **
***    ***
****  ****
**********Solution
Input:
5
Output:
*       *
**     **
***   ***
**** ****
*********Solution
Input:
5
Output:
*       *
**     **
***   ***
**** ****
*********
**** ****
***   ***
**     **
*       *Solution
Input:
5
Output:
*********
 *******
  *****
   ***
    *
   ***
  *****
 *******
*********Solution