Question: How would I write an execution chart for these two code? CODE 1: #include #include using namespace std; int inputNumber(){ int num; cout < >num;
How would I write an execution chart for these two code?
CODE 1:
#include
#include
using namespace std;
int inputNumber(){
int num;
cout<<"Please enter an integer ";
cin>>num;
return num;
}
bool checkMultiple7(int num){
if(num%7==0){
return true;
}else{
return false;
}
}
void displayResult(int num,string str){
cout< } int main(){ int num=inputNumber(); bool check=checkMultiple7(num); if(check==true){ displayResult(num,"is a multiple of 7"); }else{ displayResult(num,"is not a multiple of 7"); } return 0; } CODE 2: #include #include #include"checkMultipleHeader.h" // including the user defined header file using namespace std; int inputNumber(){ int num; cout<<"Please enter an integer "; cin>>num; return num; } void displayResult(int num,string str){ cout< } int main(){ int num=inputNumber(); bool check=checkMultiple7(num); if(check==true){ displayResult(num,"is a multiple of 7"); }else{ displayResult(num,"is not a multiple of 7"); } return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
