How to find the product of two numbers in Dev C++ - How to find the product of two numbers in Dev C++

Time: 2025-05-21Source: Huajun Software TutorialAuthor: Qingchen

Dev C++ is a software that provides a complete programming tool chain such as code editors, compilers, and debuggers. It supports single-file development and multi-file project development, and allows users to complete the entire process of code writing, compilation, debugging, and running in the IDE. Next, let Huajun editor explain to you how to find the product of two numbers in Dev C++ and how to find the product of two numbers in Dev C++!

first step

Open the Dev-C++ software

Dev C++, Dev C++ latest download

Step 2

Click "File" → "New" → "Source Code" in the menu bar

Dev C++, Dev C++ latest download

Step 3

Enter the following code in the newly created source code file:

#include <iostream>

using namespace std;


int main() {

int num1, num2, product;

   

cout << "Please enter the first number: ";

cin >> num1;

   

cout << "Please enter the second number: ";

cin >> num2;

   

product = num1 * num2;

   

cout << "The product of two numbers is: " << product << endl;

   

Return 0;

}

Dev C++, Dev C++ latest download

Step 4

After the input is completed, click "Execute" → "Compile and Run" in the menu bar (or press the F9 key)

Dev C++, Dev C++ latest download

Step 5

After the program is run, you will be prompted to enter two numbers. After input, the product will be automatically calculated and displayed.

Dev C++, Dev C++ latest download

Step 6

Verification algorithm: You can try to enter simple numbers such as 2 and 3 and check whether the output is 6

The above is how to find the product of two numbers in Dev C++ and the method of finding the product of two numbers in Dev C++ compiled by Huajun editor for you. I hope it can help you!

Related articles更多>>

Popular recommendations