What is the output of the following program? (6) Submit your answer to Dropbox.
C++ PROGRAMMING
a. What is the output if the input is -1?
b. What is the output if the input is 2?
c. What is the output if the input is 3?
d. What is the output if the input is 1?
#include <iostream>
using namespace std;
void func1();
void func2();
int main()
{
int num;
cout << "Enter a number: ";
cin >> num;
cout << endl;
if (num == 1)
func1();
else if (num == 2)
func2();
else
cout << "Invalid input: You must enter 1, 2, or 3." << endl;
return 0;
}
void func1()
{
cout << "Programming I" << endl;
}
void func2()
{
cout << "Programming II" << endl;
}