C Program to Calculate Profit and Loss for SEE and NEB
#include<stdio.h>
#include<conio.h>
main()
{
int
CP,SP,loss,gain;
printf("Enter
value of CP and SP");
scanf("%d%d",&CP,&SP);
if(SP>CP)
{
gain=SP-CP;
printf("Gain=Rs%d",gain);
}
else
{
loss=CP-SP;
printf("Loss=Rs%d",loss);
}
getch();
}
No comments:
Post a Comment