Print 12 pens cost price in C++
cout - Question 13
In this question, we will see how to print the cost of 12 pens if the cost of one pen is Rs. 14 in C++ programming using the cout statement. To know more about cout statement click on the cout statement lesson.
Q13) Write a program in C++ to print the cost of 12 pens if the cost of one pen is Rs. 14.
Program
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
cout<<"Cost of 1 pen = Rs.14"<<endl;
cout<<"Cost of 12 pens = Rs."<<12*14;
return 0;
}
Output
Cost of 1 pen = Rs.14 Cost of 12 pens = Rs.168