Intelligence of a person

 TASK:

According to a study, the approximate level of intelligence of a person can be calculated using the following formula: i=2+(y+0.5x) Write a program that will produce a table of values of i, y and x, where y varies from 1 to 6, and, for each value of y, x varies from 5.5 to 12.5 in steps of 0.5.







CODE:


CODE:


#include<stdio.h>
int main()
{
    int y;  
    float i, x;
    printf("i\t\ty\tx\n");
    for(y=1;y<=6;y++)
    {
        for(x=5.5;x<=12.5;x=x+0.5)
        {
            i = 2+(y+0.5*x);
            printf("%.2f\t\t%d\t%.2f\n",i,y,x);
        }
    }
    getchar();
    return 0;
    }
   
NEED WORK PRODUCE WORK

My name is Abdul Rehman I am from Pakistan. I am doing BS in Computer and information sciences. Currently, I am creating these blogs to help students of computer sciences all over the world..

Post a Comment (0)
Previous Post Next Post