Answer to Question #303777 in C++ for Rain Capisonda

Question #303777


  1. identify the the program structure of using conditional statements, looping and functions in a C++ program;
  2. apply the conditional statements,looping and functions in C++ program applications;
  3. apply conditional statements, looping and functions in one C++ program.

Instruction: Using conditional statements, looping and functions, write an INTERACTIVE PROGRAM on BODY SYSTEMS.  Each student must have two questions about the BODY SYSTEM.


Sample Output

Select Body System:

  1. Respiratory System
  2. Nervous System
  3. Circulatory System


Enter Number of Body System: 1


Output:

Questions For Respiratory System:

  1. Question 1
  2. Question 2


Enter Number of Question: 1


Output:

Question 1:

Sample Question 1


Answer 1:

Sample Answer 1


1
Expert's answer
2022-02-28T16:21:23-0500
#include <iostream>
using namespace std;
int main() {
  int number;
  cout << "Enter an integer: ";
  cin >> number;
  if (number >= 0) {
    cout << "You entered a positive integer: " << number << endl;
  } else {
    cout << "You entered a negative integer: " << number << endl;
  }
  cout << "This line is always printed.";
  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