Write a program to obtain a number N and increment its value by 1 if the number is divisible by 4 otherwise decrement its value by 1.

 


Write a program to obtain a number 
N and increment its value by 1 if the number is divisible by 4 otherwise decrement its value by 1.





OURSHOPKEEPER










#include <iostream>
using namespace std;
int main()
{
    int N;
    cin >> N;
    if (N % 4 == 0)
    {
        cout << N + 1;
    }
    else
        cout << N - 1;
}





    


Click on the above button to download the code.



Post a Comment

If you have furthur QUERIES please let us know

Previous Post Next Post