Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

anything about my first time doing this?

+2 votes
asked Feb 12, 2021 by DAVID ŞTEFAN DIMINESCU (160 points) 1 flag
#include <iostream>
using namespace std;

int main()
{
    double firstNumber, secondNumber, productOfTwoNumbers;
    cout << "Enter two numbers: ";

    cin >> firstNumber >> secondNumber;
     
    productOfTwoNumbers = firstNumber * secondNumber;  

    cout << "Product = " << productOfTwoNumbers;    
    
    return 0;
}

3 Answers

+2 votes
answered Feb 12, 2021 by Jeff The Chicken (2,920 points)
Perfection. I couldn't do it better myself. (cuz I don't know C++   XD)
0 votes
answered Feb 13, 2021 by akash agrawal (140 points)
#include<stdio.h>

void main()

{

int a,b,c;

printf("Enter the two number as a, b respectively\n"):

scanf("%d",&a);

scanf("%d",&b);

c=a*b;

printf("the sum of %d,%d is %d",a,b,c);

}
0 votes
answered Feb 14, 2021 by Aman Yadav (140 points)
This is absolutely correct but you can use short terms for two numbers and products. Such as firstno. Secondno. And product.
 
Else its fine good.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...