You can infinitely enter numbers, but does not count anything and does not display on the screen.
#include "stdafx.h" #include <stdio.h> #include <conio.h> #include <math.h> int _tmain() { Float a, b, c, d, m, n, f; printf("na="); scanf("%f", &a); printf("nb="); scanf("%f", &b); printf("nc="); scanf("%f", &c); printf("nd="); scanf("%f", &d); m = a * d; n = b * c; f = m + n; f = sqrt(f); printf("nm=%f", m); printf("nn=%f", n); printf("nn=%f", f); printf("nn=%f", sin(f)); printf("nn=%f", cos(f)); _getch(); }
#include "stdafx.h",#include <math.h>,_getch();and replacing_tmain()withmain(). Everything is working. - VioLetf, transmitted insqrt, is not negative? And - add at output after%f-\n: of typeprintf("nn=%f\n", f);- some people like to cache output ... - Harry