Computer for SEE and NEB

It is a complete SEE and NEB solution for computer science. It includes Computer Fundamentals, Database (SQL), Programming in C QBASIC, CSS, JavaScript, and PHP for beginners.

Breaking

Post Top Ad

Your Ad Spot

Saturday, July 16, 2022

C Program to Calculate Profit and Loss for SEE and NEB

 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

Post Top Ad

Your Ad Spot

Pages