Answer to Question #328588 in C++ for Program Training

Question #328588

Define a function PrintFeetInchShort(), with int parameters numFeet and numInches, that prints using ' and " shorthand. End with a newline. Remember that outputting 'endl' outputs a newline. Ex: PrintFeetInchShort(5, 8) prints: 

5' 8"

Hint: Use \" to print a double quote. 


1
Expert's answer
2022-04-14T06:16:56-0400
#include <iostream>
	using namespace std;
	

	/*
	
		Define a function PrintFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand. Ex: PrintFeetInchShort(5, 8) prints:
		5' 8"
		Hint: Use \" to print a double quote.
	
	/*
	
	/* Your solution goes here  */
	int PrintFeetInchShort(int feet, int inch){
		cout << feet << "' " << inch << "\"";
	}
	

	

	int main() {
	   PrintFeetInchShort(5, 8);
	   cout << endl;
	

	   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