Problem Description
Write a program to convert Fahrenheit into celsius
Input and Output Format:
Refer sample input and output for formatting specification.
All float values are displayed correct to 2 decimal places.
All text in bold corresponds to input and the rest corresponds to output.Test Case 1
Input (stdin)79.99
Expected Output26.66C
Test Case 2
Input (stdin)25.23
Expected Output-3.76C
Program
#include <stdio.h> int main() { float a,b; scanf("%f",&a); b=(a-32)*5/9; printf("%.2fC",b); return 0; }
No comments:
Post a Comment
Note: only a member of this blog may post a comment.