I wrote a very simple windows console application in c++ (in visual studio 2008) but when I send the .exe file to my friend it wont start. Btw the program works fine on my pc. Here is the program code:
#include "stdafx.h"
#include "stdio.h"
#include "math.h"
#include "string"
void main()
{
float a, b, c;
printf("**SUM UP TWO NUMBERS**\n\n");
printf("Enter first number: ");
scanf("%f", &a);
printf("Enter second number: ");
scanf("%f", &b);
c=a+b;
printf("The result is: %f\n\n\n", c);
system("pause");
}
P.S. I just started programming so don't judge if the program could be written better.