Retype the following code and fix any errors The code should
Retype the following code and fix any errors. The code should check if userNum is 2 if (userNum = 2) {cout
Solution
Program :-
#include<iostream>
using namespace std;
int main()
{
int userNum=0;
userNum=2;
if(userNum==2)
{
cout<<\"Num is two\"<<endl;
}
else
{
cout<<\"Num is not two\"<<endl;
}
return 0;
}
SampleOutput :-
Num is two
Thank you!
