6: Ali's father gave him some money and his mother gave him some money. Take input of both amount and print the sum
#include<iostream>
using namespace std;
main(){
int father, mother;
cout<<"Father gave Ali rupees= ";
cin>>father;
cout<<"Mother gave Ali rupees= ";
cin>>mother;
int total=father+mother;
cout<<"Ali have total=" <<total <<"rupees";
return 0;
}
Input:
Father gave Ali rupees= 500
Mother gave Ali rupees= 678
Output:
Ali have total=1178rupees
Comments
Post a Comment