www.cprogramming.tk

www.cprogramming.tk

Program to get float values from users and calculate sum.

A program that get two floating point values from users and calculate the sum.


 using namespace std;
#include<iostream>
#include<conio.h>
int main()
{
 float a,b,sum;
 cout<<"Enter value of a:";
 cin>>a;
 cout<<"Enter value of b:";
 cin>>b;
 sum = a+b;
 cout<<"Sum="<<sum;
 getch();
 return 0;
}


Program to get float values from users and calculate sum.  Program to get float values from users and calculate sum. Reviewed by Shoaib Jameel on 13:17 Rating: 5

No comments:

Powered by Blogger.