Infolinks - Earn Easy Money

Saturday, April 4, 2015

C++ Program to find out the cost price of one item

        #include <iostream>
          using namespace std;
          int main (  )
          {
         int sp,tp,cp,cp1;
     
   cout << " Program to calculate the price of one item \n";
     
       cout << " \n Enter the total selling price of 15 items : ";
       cin >> sp;
   cout << " \n Enter profit on selling these items : ";
       cin >> tp;
       cp=sp-tp;
       cp1=cp/15;
       cout << " \n The price of each item is : " << cp1 ;
       return 0;
          }

No comments:

Post a Comment

Must drop your comments about post.