The program skips the "Enter the pizza's weight: " part, if the string for "Enter the pizza company name: " has a whitespace.
The program's output:
Enter the pizza's diameter: 3
Enter the pizza company name: dumb pizza
Enter the weight of the pizza: Name: dumb
Weight: -4.31602e+008
Diameter: 3
Press any key to continue . . .
edit: Now I can't compile the program. The following error appears:
Unhandled exception at 0x1029e9ee in source.exe: 0xC0000005: Access violation reading location 0x206b6f6f.
But why does it skip the "Enter the pizza's weight: " part, due to the whitespace in the string.
Hence the program works fine if you type in a string without spaces in it.
It is skipping because it is reading whatever is after the space as input for the next question. So if you have your program print out the variable for the pizza's weight, you should get the second word/string of the input. But I forget how to fix it!