My issue
i couldn’t get the output pls help me with this program
My code
#include <bits/stdc++.h>
using namespace std;
int main()
{
int X = 30;
if (X % 3 == 0)
{
cout << "Number of questions incorrectly solved is 0" << endl;
}
else if ((X + 1) % 3 == 0)
{
cout << "Number of questions incorrectly solved is 1" << endl;
}
else
{
cout << "Number of questions incorrectly solved is 2" << endl;
}
X = 34;
if (X % 3 == 0)
{
cout << "Number of questions incorrectly solved is 0" << endl;
}
else if ((X + 1) % 3 == 0)
{
cout << "Number of questions incorrectly solved is 1" << endl;
}
else
{
cout << "Number of questions incorrectly solved is 2" << endl;
}
return 0;
}
Learning course: Learn Programming and Problem Solving using C++
Problem Link: https://www.codechef.com/learn/course/sit-cpp-fall/SITFALL50/problems/CPPFALL330