#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int pa,r1,r2,p1,p2,p,a,r;
cout<<"enter the first amount in rupees and paise\n";
cin>>r1>>p1;
cout<<"enter the second amount in rupees and paise\n";
cin>>r2>>p2;
p=p1+p2;
a=p/100;
pa=p%100;
r=r1+r2+a;
cout<<r<<"rupees"<<"\t"<<pa<<"paise";
getch();
}
OUTPUT:
enter the first amount in rupees and paise
1 50
enter the second amount in rupees and paise
20 70
22rupees 20paise
0 comments:
Post a Comment