Codechef Problems: Selling Sandwiches (SANDWSHOP)
Problem Statement
Solution:
given,
A : Income by Selling Sandwiches
B : Cost of Sandwich Buns
C : Cost of Vegetables
So, Final Profit = Income - Cost = A - ( B + C )
Code Solution:
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << a - b - c << endl;
return 0;
}
Comments
Post a Comment