Let the number of pages be x
and the number of copies we want be y
and total price be p
Required code is;-
#include<stdio.h>
int main()
{int x,n,p;
printf("Enter the number of pages in assignment and number of copies you want");
scanf("%d%d",&x,&n);
p=3*x+(n-1)*3+5;
printf("the price for the same is %d rupees",p);
return 0;
}
Comments
Leave a comment