Skip to content

Commit 3423b79

Browse files
Added solution to Toatal Expenses
Added solution to Total Expenses problem in C
1 parent 35cbce9 commit 3423b79

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include<stdio.h>
2+
3+
int main(){
4+
int t,quant,price;
5+
printf("Enter the total number of test cases: ");
6+
scanf("%d",&t);
7+
while(t>0){
8+
printf("Enter the quantity and price:");
9+
scanf("%d%d",&quant,&price);
10+
printf("%f\n",(float)(price*quant));
11+
t--;
12+
}
13+
}

0 commit comments

Comments
 (0)