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 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 by Jeff The Chicken (2,810 points)
Perfection. I couldn't do it better myself. (cuz I don't know C++   XD)
0 votes
answered Feb 13 by akash agrawal (140 points)

void main()


int a,b,c;

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




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

0 votes
answered Feb 14 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.