This is part of my first comp sci assignment, we are writing a C program that evaluates several equations. Here is the code that is giving the wonky result:
// 1. Newton’s Second Law of Motion
printf("Newton's Second Law of Motion \nPlease enter mass and acceleration as decimal-point values separated by a comma (ex. 150.0,5.5): ");
scanf("%lf, %lf", &mass, &accel);
printf("Newton’s Second Law of Motion: force = mass * acceleration = %lf * %lf = %lf\n\n\n", mass, accel, mass*accel);
When the program is run, the first printf displays fine, but the second displays “NewtonÆs” instead of “Newton’s”.
Are you using UNICODE?
Seems like there’s a difference in the apostrophe:
Newton’svsNewton's. Did you copy-paste from somewhere?