Write a C++ program to add two dollars and cents.
Answers
Answered by
9
Explanation:
include<iostream>
using namespace std;
int main()
{
int a,b,c,d;
std::cin>>a>>b>>c>>d;
int e=a+c;
int f=b+d;
while(f>100)
{
f=f-100;
break;
}
while(e>100)
{
e=e+1;
break;
}
std::cout<<e<<"\n"<<f;
return 0
Hope it's help you
Please mark me as Brainliest buddie
Answered by
0
Answer:
#include<iostream>
using namespace std;
int main()
{
int a,b,c,d;
cin>>a;
cin>>b;
cin>>c;
cin>>d;
int e=a+c;
int f=b+d;
while(f>100)
{
f=f-100;
break;
}
while(e>100)
{
e=e+1;
break;
}
cout<<e<<"\n"<<f;
return 0;
//Type your code here.
}
Similar questions