C program to calculate engineering cutoff.

C program
C PROGRAM 

 C program to calculate engineering cutoff

#include<stdio.h>

void main()

{

    char name[20];

    int m,p,h;

    float result;

    float a,b,c;

    printf("Enter your name\n");

    scanf("%s",name);

    printf("Enter your maths mark\n");

    scanf("%d",&m);

    printf("Enter your physics mark\n");

    scanf("%d",&p);

    printf("Enter your chemistyr mark\n");

    scanf("%d",&h);

    a=m/2.0;

    b=p/4.0;

    c=h/4.0;

    result=(a+b+c)*2;

    printf("Engineering cutoff=%f",result);

}

OUTPUT:

Enter your name
Hariharan
Enter your maths mark
98
Enter your physics mark
99
Enter your chemistry mark
95
Engineering cutoff=97.500000
[Process completed (code 28) - press Enter]

No comments:

Post a Comment




Copyright Ⓒ 2022 | Mechpedia | All Right Reserved.