ExercInstruções2

De IFSC
Revisão de 19h35min de 10 de maio de 2017 por imported>Fargoud (Criou página com ' #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("E...')
(dif) ← Edição anterior | Revisão atual (dif) | Versão posterior → (dif)
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;

}