+ 1
Why this c program not show output
#include<stdio.h> #include<conio.h> #include<math.h> void main() { double a, b, c, s, area; clrscr(); printf("\nEnter the sides of triangle : \n"); scanf("%lf%lf%lf", &a, &b, &c); s = (a + b + c) / 2; area = sqrt(s * (s - a) * (s - b) * (s - c)); printf("\nArea of triangle using Heron's Formula : %.2lf", area); getch(); } https://www.sololearn.com/discuss/2272485/?ref=app
6 ответов
+ 3
From stackoverflow:
"conio.h is a c header file used in old MS-DOS compilers...
The #include <curses.h> will give you almost all the functionalities that was provided in conio.h"
conio.h seems to be very depricated. ;)
+ 1
It works fine after removing conio.h file atleast on sololearn not sure about other platforms
0
Where you running this code..? What problem your getting? I executed it with output..
Aditya Singh
Here, conio.h is deprecated api, don't works here. .. Remove conio.h, getch(), clrscr()... (But it works on old compliers, not here)
Make int main()
Put a space in scanf between specifiers..
0
Thnkss alll
0
Thnks taylor