I am just a student and beginning to learn C programming, so I am not really on an advanced level.
I have this piece of code, and I guess that it is pretty easy to understand what I am trying to do. However I get an error saying an error before if.
I suspect that the problem is my if-else statement in between the if and else. How would you guys solve it?
#include <stdio.h>
#include <iostream>
int main ()
{
int N;
scanf("%i",&N);
if (N > 50)
(if (N > 75)
N = N - 25;
N = N - 10;
)
else
N = N + 10;
printf("%i",N);
}
Aucun commentaire:
Enregistrer un commentaire