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
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
Hindi,
6 months ago
English,
6 months ago
Computer Science,
6 months ago
Math,
1 year ago
Computer Science,
1 year ago
Biology,
1 year ago