on this code there is a basic output and output
the first thing you gotta do is:
#include <iostream>
using namespace std;
int main()
(on the first line, you declare the integers you wanna use for the code)
(the second line specifies what is going to be done)
(on the third line you are just asking for the first number)
cin>>num1;( this new line is an input, where the person is going to write the number in the console after is asked for)
cout<<“give me the second number”<<endl;
cin>>num2; (same as the other, this is an input of the other number)
cout<<“the result is: “<< num1*num2 <<endl; ( this time after the “<<” you write the equation, because there is no need to declare another variable an insert it here, this time the program does it here and just shows you the result.
then you end the line with the “endl;”
on this code you are showing and asking for in the console. this is a basic output and input
}
Mastery10 by luis armando is licensed under a Creative Commons Attribution 4.0 International License.