C++ task1

 C++ Actual implementation Task#1

Code:


1st blog:

#include<iostream>

using namespace std;

int main ()

{

int Book1,Book2,Book3;

int sum= 0;

int subtract;

int multiplication;

cout<<"Enter price of book 1:"<<endl;

cin>>Book1;

cout<<"Enter price of book 2:"<<endl;

cin>>Book2;

cout<<"Enter price of book 3:"<<endl;

cin>>Book3;

cout<<"Sum of prices of these three books is below:"<<endl;

sum= Book1+Book2+Book3;

cout<<sum<<endl;

cout <<"In below section the price of book2 is subtractrd from the price of book1 and then the price of book3 is subtracted from the price of book2 :"<<endl;

subtract= Book1-Book2;

cout<<"Book1-Book2= "<<subtract<<endl;

subtract= Book2-Book3;

cout<<" Book2-Book3="<<subtract<<endl;

cout<<"In this section we will multiply the valuse of above three books:"<<endl;

multiplication= Book1*Book2*Book3;

cout<<"After the multiplication of values of books value will be="<< multiplication<<endl;

}






Comments