Computer Science, asked by kalpanaakanna, 1 year 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
0

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