Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Which is not an object oriented programming language?

950


Is this job good for future? can do this job post grduate student?

2118


What does and I oop and sksksk mean?

1119


What is a function in oop?

1040


What are the 3 principles of oop?

1071


Why interface is used?

976


can we make game by using c

4067


What is debug class?what is trace class? What differences are between them? With examples.

2148


What is methods in oop?

943


What is the diamond problem in inheritance?

1088


What is for loop and its syntax?

1061


write a program that takes input in digits and display the result in words from 1 to 1000

2382


What is new keyword in oops?

1006


What is the difference between abstraction and polymorphism?

1068


program for insertion ,deletion,sorting in double link list

2657