26.9k views
2 votes
Write a program that accepts a whole number as Input multiplies that number by 12 the outputs the product

1 Answer

3 votes

Answer:

Explanation:

programs can be written in multiply languages. for this solution I'll be writing in C++.

#include<iostream> // this is called the preprocessor definition

using namespace std;

int main() //the main function

{

int num, product; //declaration of the variables

cout << "enter the whole number";

cin >> num;

product = num * 12;

cout << product; // displaying the final results

return 0;

}

User Afzal Masood
by
8.6k points