Hi all, I'm completely new to programming, and am facing this problem on day 1. I typed in this code from a book:
#include <stdio.h>
#include <math.h>
int main(void)
{
double x1=1, y1=5, x2=4, y2=7,
side_1, side_2, distance;
side_1=x2-x1;
side_2=y2-y1;
distance=sqrt(side_1*side_1 + side_2*side_2);
printf("The distance between the two points is "
"%5.2f \n",distance);
return 0;
}
I saved the file and ran the exe, and the result window just kinda blinked away. How can I make it stay and display the result until I close the window?
Thanks in advance.