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
How do you define social class?
What does enum stand for?
What is abstraction and encapsulation?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
What is destructor give example?
What is overriding vs overloading?
What are the three main types of variables?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
What are the important components of cohesion?
What is destructor oops?
Get me a number puzzle game-program
what is the sylabus for priliminaries?
What does oop mean in snapchat?
What is cohesion in oop?