To find the Product of two variables in C++ programming
Get link
Facebook
X
Pinterest
Email
Other Apps
product.learnprogramming.com
Product of two variables:
#include < iostream >
using namespace std;
int main()
{
int a ;
int b ;
int product = 1 ;
a = 2 ;
b = 3 ;
product = a * b ;
cout << product << endl ;
return 0;
}
http://codingc++.fashionandcs.com Program to display the output : Syntax: The syntax used to display the output within the C++ Program is cout must use angle brackets << and the semi colon ; with the sysntax if we want to display the word same as written, we uses " like: we want to display the word program we will write as: cout<<"program"; You can see the folowing program #include < iostream > using namespace std; int main() { cout << "Programming"; return 0; }
Comments
Post a Comment