D. Bill Counting
Problem link
https://algo.codemarshal.org/contests/diu-122-fl16-termwork/problems/D
Score: 1
CPU: 1s
Memory: 512MB
CPU: 1s
Memory: 512MB
The price of a burger is taka B and the price of a glass of coke is taka C. There are S students in your class. What will be the total bill if you want to treat everyone of your class with a burger and a glass of coke?
Input
3 integers in a single line: B (price of a burger), C (price of a glass of coke) & S (number of students).
Output
A single integer - The total bill.
Sample
Input | Output |
---|---|
60 50 30 | 3300 |
Solutin
#include<stdio.h> int main() { int B,C,S,T; scanf("%d%d%d",&B,&C,&S); T=(B+C)*S; printf("%d\n",T); return 0; }
No comments:
Post a Comment