Pages

Saturday, March 31, 2012

Wap to Calculate Profit & Loss


/*Profit & Loss */
#include<stdio.h>
#include<conio.h>
     void main()
       {
 float selling_prize,buying_prize;
 clrscr();

 printf("\n Calculate Profit & Loss");

 printf("\n Enter Purchasing Prize  for 15 Items::");
 scanf("%f",&buying_prize);


   printf("\n Enter Selling Amount for 15 Items::");
 scanf("%f",&selling_prize);

 if(buying_prize<selling_prize)
 printf("\n\t Profit :$ %f",selling_prize - buying_prize);
 else
 printf("\n\t Loss  :$%f",buying_prize - selling_prize);

 printf("\n Want More Need Example for Practice ");
 printf("\n     Logon www.Code2Create.com");

 getch();
}


No comments:

Post a Comment