ExercInstruções2
Ir para navegação
Ir para pesquisar
#include <stdio.h>
#include <stdlib.h>
int main()
{ float a, b, y, x;
int i;
system("color F1");
printf("*** PROGRAMA DA RETA Y = A.X + B****\n");
printf("Entre com os valores de A e B :> ");
scanf("%f %f", &a, &b);
printf("\n\n\t\tY:\t\tX:\n\t\t__________________________\n");
for(x=0, i=1;x<=10;x+=0.01, i++)
{
y = a*x + b;
if(i%50==0)
system ("pause");
printf("\t\t%.1f\t\t%.1f\n", y, x);
}
return 0;
}