Problem Description
Harinis home work for second day is to subtract two numbers, help Harini to solve the problem.Test Case 1
Input (stdin)7.2 1.5
Expected OutputThe Subtraction of two number is:5.700000 The Subtraction of two number is:5.70
Test Case 2
Input (stdin)5.0 2.0
Expected OutputThe Subtraction of two number is:3.000000 The Subtraction of two number is:3.00Program
#include <stdio.h> int main() { float a,b,sub; scanf("%f%f",&a,&b); sub=a-b; printf("The Subtraction of two number is:%f\n",sub); printf("The Subtraction of two number is:%.2f\n",sub); return 0; }
No comments:
Post a Comment
Note: only a member of this blog may post a comment.