13. PROFIT CALCULATOR

Image result for c programming
Code:
  #include<stdio.h>
int main(){
  int n,c,s,o=0;
  printf("Enter the number of copies sold\n");
  scanf("%d",&n);
  printf("Enter the cost of 1 copy of the newspaper\n");
  scanf("%d",&c);
  printf("Enter the cost spent by the agency on 1 copy of the newspaper\n");
  scanf("%d",&s);
  o=((n*c)-(n*s))-100;
  printf("The profit obtained is Rs.%d",o);


  return 0;
}

No comments