+ 1
Hey guys am trying to write a program that accepts a variable and uses an if statement
The program is to increase the value of the input by 5 if it's a multiple of 3 and reduce it by 3 if it's not. Can anyone help me am stuck. Don't know what to do next.or how to input the if statement
4 Respuestas
+ 3
#include<stdio.h>
int main()
{
int input;
Scanf("%d",&input);
if(input%3==0)
input=input+5;
else
input=input-3;
}
0
It's a C program
0
Can't seem to work. are there possible ways of getting to the same result even.
0
#include<stdio.h>
int main()
{
int input;
Scanf("%d",&input);
if(input%3==0)
input=input+5;
else
input=input-3;
}