#include <stdio.h>
int main()
{
int radius, diameter; //variable declaration
printf("Enter radius: "); //prompt
scanf_s("%d", &radius); //store user input for radius
diameter = radius * 2; //assignment statement to store diameter computation
printf("the radius is: \n"); //display radius to output screen
printf("the diameter is: \n" &diameter); //displays newline
Return 0; //terminate program
}
The last printf is missing a format specifier and a comma that separates the arguments.
The return keyword spelled with all lower case letters.
what do you mean it is missing a format specifier?
I mean you want to print an int but the format string does not contain %d.