Posts

C++ actual implementation task #2

 3rf blog: #include<iostream>  using namespace std;   int main()  {  double percentage, obtaindMarks; cout<<" Enter your obtained marks of matric:\n "; cin>>obtaindMarks; percentage= obtaindMarks/1100*100; cout<<"Percentage ="<<percentage; if( percentage>=90)  {  cout<<"\nHere is your grade:\ngrade is A";  }  else if( percentage>=80)  {  cout<<" \nHere is your grade:\ngrade is B";  }  else if( percentage>=70)  {  cout<<"\nHere is your grade:\ngrade is C";  }  else if( percentage>=60)  {  cout<<"\nHere is your grade:\ngrade is D";  }  else if ( percentage>=50)  {  cout<<"\nHere is your grade:\ngrade is F";  }  else if ( percentage<=50)  {  cout<<"\n You are unable to meet the required critaria";  }  } 

Multiple tables

 2nd blog: #include <iostream> using namespace std; int main( ) { int  n,i; cout<<"Enter n:"; cin>>n; cout<<" Table of 5:"<<endl; for(i=1; i<=10;++i ) { cout<<i<<"*"<<n<<"="<<i*n<<endl; } }

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:"<