Computer Science, asked by kalpanaakanna, 10 months ago

How to write a program in c to find the cost of 17 pencils if the cost of one pencil is 2 rupees 50 paise

Answers

Answered by gurukulamdivya
1

here is your Answer:

#include<stdio.h>

#include<conio.h>

void main()

{

float p=2.50, n; //p stores the cost of one pencil

n = p * 17;  // here we calculate the cost of 17 pencils

printf("The cost of 17 pencils is %f" ,n);

getch();

}

I hope this helped you so plz rate accordingly

Similar questions