/*************************************************
UNIVERSIDAD DE LA CIUDAD DE MEXICO
CARLOS E. LOPEZ 0445534086216
**************************************************/
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <math.h>
using namespace std;
int main(int argc, char *argv[])
{
int f[3];
int x=-5;
int indice=0;
textbackground(BLUE);
textcolor(WHITE);
clrscr();
printf("\n\n\t PROGRAMA QUE EVALUA UNA FUNCION \n\n");
for(;x<=2;x++)
{
f[indice]=pow(x,2)-3*x+2;
indice++;
}
textcolor(YELLOW);
printf("\t\t x \t f(x) \n\n");
for(indice=0;indice<=7;indice++)
{
textcolor(WHITE);
printf("\t\t %d \t %d \n",indice-5,f[indice]);
}
getch();
return 0;
}
UNIVERSIDAD DE LA CIUDAD DE MEXICO
CARLOS E. LOPEZ 0445534086216
**************************************************/
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <math.h>
using namespace std;
int main(int argc, char *argv[])
{
int f[3];
int x=-5;
int indice=0;
textbackground(BLUE);
textcolor(WHITE);
clrscr();
printf("\n\n\t PROGRAMA QUE EVALUA UNA FUNCION \n\n");
for(;x<=2;x++)
{
f[indice]=pow(x,2)-3*x+2;
indice++;
}
textcolor(YELLOW);
printf("\t\t x \t f(x) \n\n");
for(indice=0;indice<=7;indice++)
{
textcolor(WHITE);
printf("\t\t %d \t %d \n",indice-5,f[indice]);
}
getch();
return 0;
}