Topic:
Standard Output in C++
Problem:
Write a program that adds two floating point numbers and shows the sum on screen.
Solution:
#include<iostream.h>
#include<conio.h>
int main ()
{
float height=14, width=15.2, area;
area=height*width;
cout<<"area of square:"<<area;
getch();
}
#include<conio.h>
int main ()
{
float height=14, width=15.2, area;
area=height*width;
cout<<"area of square:"<<area;
getch();
}
Output:
Let me know in the comment section if you have any question.
Previous Post:
Next Post: