0

Pls some one help me to run this program i try but wouldn't

include<stdio.h> #include<conio.h> void main(void) { //*program that can calculate cgpa of two smesters float gpa1,gpa2,cgpa; clrscr(); printf("Enter your first gpa="); scanf("%f",&gpa1); printf("\nEnter your 2nd gpa="); scanf("%f",&gpa2); cgpa=(gpa1+gpa2)/2; printf("\nYour CGPA is %f",cgpa); getch(); }

10th Aug 2019, 10:23 AM
Usman Suleiman Jibrin
Usman Suleiman Jibrin - avatar
4 Respuestas
10th Aug 2019, 10:27 AM
GAWEN STEASY
GAWEN STEASY - avatar
+ 8
Usman Suleiman Jibrin getch(), clrscr() is conio.h library functions which are only supported in old compiler like TurboC++ which should not be used as there are many modern compiler are present. #include<stdio.h> int main(void) { //*program that can calculate cgpa of two smesters float gpa1,gpa2,cgpa; printf("Enter your first gpa="); scanf("%f",&gpa1); printf("\nEnter your 2nd gpa="); scanf("%f",&gpa2); cgpa=(gpa1+gpa2)/2; printf("\nYour CGPA is %f",cgpa); }
10th Aug 2019, 10:27 AM
GAWEN STEASY
GAWEN STEASY - avatar
0
include<stdio.h> #include<conio.h> void main(void) { //*program that can calculate cgpa of two smesters float gpa1,gpa2,cgpa; clrscr(); printf("Enter your first gpa="); scanf("%f",&gpa1); printf("\nEnter your 2nd gpa="); scanf("%f",&gpa2); cgpa=(gpa1+gpa2)/2; printf("\nYour CGPA is %f",cgpa); getch(); }
10th Aug 2019, 10:23 AM
Usman Suleiman Jibrin
Usman Suleiman Jibrin - avatar