Menu

(Solved) : Include Using Namespace Std Program Calculates Amount Pasta Cook Given Number People Eatin Q44025516 . . .

#include <iostream>using namespace std;/* This program calculates the amount of pasta to cook, given the number of people eating. Author: Mario Boyardee Date: May 30, 2017*/int main() { int numPeople; // Number of people that will be eating int totalOuncesPasta; // Total ounces of pasta to serve numPeople // Get number of people cout << “Enter number of people: ” << endl; cin >> numPeople; // Calculate and print total ounces of pasta totalOuncesPasta = numPeople * 3; // Typical ounces per person cout << “Cook ” << totalOuncesPasta << ” ounces of pasta.” << endl; return 0;}

Indicate which are valid code.

1)

// Get user input

Valid

Invalid

2)

/* Get user input */

Valid

Invalid

3)

/* Determine width and height, calculate volume, and return volume squared.*/

Valid

Invalid

4)

// Print “Hello” to the screen //

Valid

Invalid

5)

// Print “Hello” Then print “Goodbye” And finally return.//

Valid

Invalid

6)

/* * Author: Michelangelo * Date: 2014 * Address: 111 Main St, Pacific Ocean */

Valid

Invalid

7)

// numKids = 2; // Typical number

Valid

Invalid

8)

/* numKids = 2; // Typical number numCars = 5; */

Valid

Invalid

9)

/* numKids = 2; /* Typical number */ numCars = 5;*/

Valid

Invalid

Expert Answer


Answer to #include using namespace std; /* This program calculates the amount of pasta to cook, given the number of people eating…

OR