Answer to Question #214884 in C++ for Eric

Question #214884

Using the code stub below, write a statement that assigns numCoins with numNickels + numDimes. E.g.,: 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.#include <iostream>using namespace std;int main() {  int numCoins;  int numNickels;  int numDimes;  numNickels = 5;  numDimes = 6;  


1
Expert's answer
2021-07-07T18:04:35-0400
#include <iostream>


using namespace std;


int main() 
{  
    int numCoins;  
    int numNickels;  
    int numDimes;  numNickels = 5;  numDimes = 6; 
    numCoins=numNickels+numDimes;
    cout<<numNickels<<" nickels and "<<numDimes<< " dimes results in "<<numCoins<<" coins";
    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
APPROVED BY CLIENTS