Welcome

>>>Welcome to my "CODE BAZAR"
Code marshal
URI online judge
Others
Code marshal
URI online judge
Others
Code marshal
URI online judge
Others

Update ✔✔✔ Upcoming programming book (.pdf) "Programming Contest (data structures and algorithms) by Md. Mahbub Hasan & "Graph Algorithms" by Safayat Asraf "****** Date: 20 March, 2019****Hazrat Ali****

Sunday 30 October 2016

D. Bill Counting

Problem link
https://algo.codemarshal.org/contests/diu-122-fl16-termwork/problems/D

Score: 1

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

InputOutput
60 50 303300

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