#include<stdio.h>
int main()
{
int num,a,numr,sp,cp,b;
float pr,profit;
printf("Enter the number of dozens of toys purchased\n"); printf("Enter the price per dozen\n"); printf("Enter the selling price of 1 toy\n"); cp=(a*num);
sp=(b*12*num);
numr=(float)sp-cp;
pr=((float)numr/cp);
profit=pr*100;
if(profit<0)
{
printf("Price should not be negative\n"); }
else
printf("Sanjay's profit percentage is %.2f",profit
); return 0;
}
ICNpbmNsdWRlPHN0ZGlvLmg+CmludCBtYWluKCkKewogICAgaW50IG51bSxhLG51bXIsc3AsY3AsYjsKZmxvYXQgcHIscHJvZml0OwogICAgcHJpbnRmKCJFbnRlciB0aGUgbnVtYmVyIG9mIGRvemVucyBvZiB0b3lzIHB1cmNoYXNlZFxuIik7CiAgICBzY2FuZigiJWQiLCZudW0pOwogICAgcHJpbnRmKCJFbnRlciB0aGUgcHJpY2UgcGVyIGRvemVuXG4iKTsKICAgIHNjYW5mKCIlZCIsJmEpOwogICAgcHJpbnRmKCJFbnRlciB0aGUgc2VsbGluZyBwcmljZSBvZiAxIHRveVxuIik7CiAgICBzY2FuZigiJWQiLCZiKTsKICAgIGNwPShhKm51bSk7CgogICAgc3A9KGIqMTIqbnVtKTsKbnVtcj0oZmxvYXQpc3AtY3A7CnByPSgoZmxvYXQpbnVtci9jcCk7CnByb2ZpdD1wcioxMDA7CiAgICBpZihwcm9maXQ8MCkKICAgIHsKICAgIHByaW50ZigiUHJpY2Ugc2hvdWxkIG5vdCBiZSBuZWdhdGl2ZVxuIik7CiAgICB9CiAgICBlbHNlCiAgICBwcmludGYoIlNhbmpheSdzIHByb2ZpdCBwZXJjZW50YWdlIGlzICUuMmYiLHByb2ZpdCk7CiAgICByZXR1cm4gMDsKfQ==