C++ coding project 11 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 2

C++ coding project 11

I cant complete that project it is too Hard could anyone help me with it?

7th Mar 2022, 5:30 AM
Vekezy
24 Answers
+ 3
#include <iostream> using namespace std; int main() { //your code goes here int x; cin>>x; cout<<50-(x%50); return 0; }
8th Mar 2022, 6:49 AM
Daniel Middendorf
Daniel Middendorf - avatar
+ 3
#inculde <iostream> int main() { int people = 100 int seats = 28 int busses = People / seats int taken = people % seats int open = seats - taken std::cout << busses << endl; std::cout << taken << endl; std::cout << open << endl; return 0; }
7th Mar 2022, 7:21 AM
Vekezy
+ 1
U first declare a variable Then use cin to assign input Ex: int x; cin >> x;
7th Mar 2022, 6:04 AM
Raul Ramirez
Raul Ramirez - avatar
+ 1
#include <iostream> using namespace std; int main() { //your code goes here int pass = 12; int tila = 26; int sum = pass + tila; cin << sum <<endl; int a = 231; int b = 222; int summ = a - b; cin << summ <<endl; return 0; }
7th Mar 2022, 6:18 AM
Vekezy
+ 1
Lol i meant algebra expressions Here are the answers A) Number of busses = people / seats B) taken = people % seats C) Open = seats - taken For this project you have to do B and C in code Keep in mind you know the mumber of seats is 50 So you just get the number of people using cin Then implement b and c And output c
7th Mar 2022, 6:52 AM
Raul Ramirez
Raul Ramirez - avatar
0
First get the number of people Then calculate people on the last bus Then use that to find the number of empty seats
7th Mar 2022, 5:54 AM
Raul Ramirez
Raul Ramirez - avatar
0
Theres 5 tests how i Do all of them In one go
7th Mar 2022, 5:57 AM
Vekezy
0
By not hardcoding the numbers but getting them using cin
7th Mar 2022, 5:58 AM
Raul Ramirez
Raul Ramirez - avatar
0
How do i use cin?
7th Mar 2022, 5:59 AM
Vekezy
0
Oooooh
7th Mar 2022, 6:04 AM
Vekezy
0
Thanks for info
7th Mar 2022, 6:04 AM
Vekezy
0
np
7th Mar 2022, 6:05 AM
Raul Ramirez
Raul Ramirez - avatar
0
But i will dont knwo how to do this :D
7th Mar 2022, 6:11 AM
Vekezy
0
Share what you have so far
7th Mar 2022, 6:15 AM
Raul Ramirez
Raul Ramirez - avatar
0
Thats not my real code i guess it must have for gotten to save
7th Mar 2022, 6:21 AM
Vekezy
0
Um start by deleting everything inside the main function lol
7th Mar 2022, 6:22 AM
Raul Ramirez
Raul Ramirez - avatar
0
In your own words tell me the problem of the project
7th Mar 2022, 6:23 AM
Raul Ramirez
Raul Ramirez - avatar
0
I just dont know how to solve it its Hard and i get error and dont get it working and My brain cells are dying up
7th Mar 2022, 6:24 AM
Vekezy
0
Test case 1 input 12 expected out put 38 TEST CASE 2 input 231 expected 19
7th Mar 2022, 6:26 AM
Vekezy
0
Dont worry about the test cases or the code First solve this Given that a bus contains s seats A) write an expression to find how many busses i need to transport p people B) write an expression to find the number of taken seats on the last bus C ) write an exression to find the number of open seats on the last bus
7th Mar 2022, 6:34 AM
Raul Ramirez
Raul Ramirez - avatar