Answer:
// here is code in C++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variables
 int a,b,c;
 //ask to enter semester hours
 cout<<"Enter the number of hours in the semester:";
 // read the semester hours
 cin>>a;
 //print the semester hours
 cout<<"You have taken "<<a<<" hours in semester."<<endl;
 // find the time spend outside of the class
 b=a*2;
 c=a*3;
 // print the time outside class
 cout<<"you should spend "<<b<<"-"<<c<<" hours outside of class"<<endl;
 return 0;
}
Step-by-step explanation:
Read the hours taken in the semester from user and assign it to "a".
Then find its 2 and 3 time.This will be the time user should spend outside
of the class.
Output:
Enter the number of hours in the semester:15
You have taken 15 hours in semester.
you should spend 30-45 hours outside of class