So i(a total beginner) tried to run c file on vs code(mac os). By using magic I somehow accessed terminal(i was using debug console before, and it was pain in …). But now it won’t work properly, it’s just stop after i enter first number
Here the code
#include<stdio.h>
#include<math.h>
int main(void)
{
double a,b,c;
printf("enter number a");
scanf("a=%lfn",&a);
printf("enter number b");
scanf("b=%lfn",&b);
printf("enter number c");
scanf("c=%lfn",&c);
double d;
d=(sqrt(a*b(a+b+c)(a+b-c))/(a+b);
printf("result=%lfn:",d);
return 0;
}
Here is output
cd "/Users/roman/Desktop/bob/" && gcc test2.c -o test2 && "/Users/roman/Desktop/bob/"test2
roman@MacBook-Air-Roman ~ % cd "/Users/roman/Desktop/bob/" && gcc test2.c -o test2 && "/Users/roman/Desktop/bob/"test2
enter number a12 #here i enter number
enter number benter number cresult=-0.000000
:%
roman@MacBook-Air-Roman bob %
4