Tuesday, 3 July 2018

how to calculate the sum of floating point number in c++

Write a programm that store three values in floating type of variables and display it sum
  solution

#include <iostream>
using namespace std;

int main() {
float a=22.33, b=3.44, c= 44.44, sum;
         sum =a+b+c;
cout<<"The sum is "<<sum;

return 0;
}

No comments:

Post a Comment