-1
I got a problem and I don’t know how to fix it.
The program in C
that I developed this presenting several types of errors and do not know what could be:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main ()
{
int SA, SN;
int NOME, AUMENTO;
printf ("NOME");
scanf ("%f", &NOME);
if (SA <= 400);
SN= SA*1.12;
AUMENTO="15%";
else
if (SA <=700);
SN=SA*1,12;
AUMENTO= "12%";
else
if (SA <=1000);
SN=SA*1,1
AUMENTO= "10%";
else
if (SA <= 1800);
SN=SA*1,07;
AUMENTO= "7%";
else
if (SA <=2500)
SN=SA*1,04;
AUMENTO= "4%";
else
AUMENTO="sem aumento"
printf ("NOME: ", NOME, ",% de aumento: ", AUMENTO, ",Salario atual", SA, "Novo salário: ",SN);
System ("PAUSE");
I’m confused about one thing, because he’s making a mistake in the lines I’m using %?
– matheus ferreira
It has a simple technique to discover the place of mistakes, called "Divide and Conquer". You do so, comments the second half of the code, checks whether errors continue, whether they continue to comment on the second half of the code that remained and so on, until you find the excerpt with a compilation error. For C++ this technique should provide the characteristics of the OO implementation.
– lsalamon