Program to input sell price and cost price and calculate Profit.

/*Program to calculate Profit */
#include<stdio.h>
#include<conio.h>
void main()
{
int sp,cp,p=0;
clrscr();
printf("Enter sell price=");
scanf("%d",&sp);
printf("Enter cost price=");
scanf("%d",&cp);
p=sp-cp;
printf("Profit=%d",p);
getch();
}

OUTPUT 



Comments

Popular posts from this blog

Write a program to input age of any person and check he is eligible for voting or not.

Write a program to input two digit number and check number is palindrome or not.

Write a program to input speed of Royal Enfield and check it's running at economic speed or not.