Write a program in c++ to read two floating point numbers
and find their sum and average.
Answer Posted / mahmali
#include<iostream.h>
#include<conio.h>
main()
{
float a,b,sum,avg;
cout<<"Enter values of a and b";
cin>>a>>b;
sum=a+b;
avg=sum/2;
cout<<"sum of the no.="<<sum;
cout<<"avg of the no.="<<avg;
getch();
}
| Is This Answer Correct ? | 2 Yes | 5 No |
Post New Answer View All Answers
Which is not an object oriented programming language?
Is this job good for future? can do this job post grduate student?
What does and I oop and sksksk mean?
What is a function in oop?
What are the 3 principles of oop?
Why interface is used?
can we make game by using c
What is debug class?what is trace class? What differences are between them? With examples.
What is methods in oop?
What is the diamond problem in inheritance?
What is for loop and its syntax?
write a program that takes input in digits and display the result in words from 1 to 1000
What is new keyword in oops?
What is the difference between abstraction and polymorphism?
program for insertion ,deletion,sorting in double link list