Answer to Question #293072 in C++ for lui

Question #293072

Write a statement that assigns numCoins with numNickels + numDimes. Ex: 5 nickels and 6 dimes results in 11 coins.


Note: These activities may test code with different test values. This activity will perform two tests: the first with nickels = 5 and dimes = 6, the second with nickels = 9 and dimes = 0.


1
Expert's answer
2022-02-02T05:09:30-0500
#include <iostream>
#include <string>
using namespace std;


int main(){
	int numNickels,numDimes;


	cout<<"Ente numNickels: ";
	cin>>numNickels;
	cout<<"Ente numDimes: ";
	cin>>numDimes;


	int numCoins =numNickels + numDimes;
	cout<<"numCoins: "<<numCoins<<"\n\n";


	system("pause");
	return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog