U A C M

¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.
U A C M

Universidad Autónoma de la Ciudad de México


    PROGRAMA QUE EVALUA UNA FUNCION (Arreglos #3)

    Krlos
    Krlos
    Admin


    Mensajes : 72
    Fecha de inscripción : 11/05/2011

    PROGRAMA QUE EVALUA UNA FUNCION (Arreglos #3) Empty PROGRAMA QUE EVALUA UNA FUNCION (Arreglos #3)

    Mensaje  Krlos Dom Mayo 22, 2011 4:51 pm

    /*************************************************
    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;
    }

      Fecha y hora actual: Dom Mayo 19, 2024 7:22 am