Last active
August 29, 2015 14:01
-
-
Save Manume/38a5dc0531482eac1c3f to your computer and use it in GitHub Desktop.
sum and average of two numbers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream.h> | |
#include <iostream.h> | |
#include <conio.h> | |
void main() | |
{ | |
clrscr(); | |
int x,y,sum; | |
float average; | |
cout << "Enter 2 integers : " << endl; | |
cin>>x>>y; | |
sum=x+y; | |
average=sum/2; | |
cout << "The sum of " << x << " and " << y << " is " << sum << "." << endl; | |
cout << "The average of " << x << " and " << y << " is " << average << "." << endl; | |
getch(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment