I'm sorry to ask you the most basic question, but the question is
Write a program that reads two integers a and b to find the sum and outputs it as follows.
Program execution result 1
Input of two integers a and b: 23
2 +3 == 5
Program execution result 2
Input of two integers a and b: 2-3
2 -3 == -1
Here's the question. It's a basic visual studio, but the one I made is
void main() { int a, b, area;
printf ("two integers a, b force:");
scanf_s("%d, %d", &a, &b);
area = a + b;
printf("area=%d \n", area);
}
If you type a and b and press Enter, the window will turn off immediately What's the problem?
c=+
Enter the properties of the current project in the Visual Studio (vs).
Right-click the project's name in the Solution Explorer.
Once in the properties, click <Linker> in the left menu to expand.
Then there's <System> in the sub-lists, if you click on it, a window appears on the right.
At the top is <Subsystem>. Click the blank next to it, lower the scroll bar, select <Console>, and click OK. I'll attach a picture.
578 Understanding How to Configure Google API Key
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
912 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.