Computer Science, asked by meetk1496, 4 months ago

Q5) Accept the cost of 1 pen from the user. Find the total
amount to be paid FOR 10 PENS and print it.

Answers

Answered by ramyaperavali136
0

Answer:

#include<studio.h>

int main ()

{

int cost;

scanf ( "%d",&cost);

printf("%d", 10*cost);

return 0;

}

Explanation:

here, cost is the value of one pen.

we are printing the cost of 10 pens i.e., 10*cost

for example, if cost is given as 5 then the output is 10*5 = 50

Similar questions