+ 3
Fruit bowl approach
I m not getting any error but can you guys tell more merhods Check: #include <iostream> using namespace std; int main() { int fruit , result ; //take input cin>>fruit; result = fruit/6 ; cout <<""<<result; return 0; }
7 Respostas
+ 2
Yes result will give same but its depend on your think how much efficient and easy you can make your code in less lines
+ 3
🗡️Jasprit ,Namit Jain thanks for explaining.
Can u guys help me out with hovercraft prblm
https://www.sololearn.com/discuss/2503846/?ref=app
+ 2
Snehal why do you want more methods if this method works
And this is best possible method
Ok,
Instead of declaring a new variable
Just do fruit /= 6;
How do you know that everyone is using (fruit/2)/3 ?
I used fruit/6 only
Now, move on and try out more code coach 🙌
+ 2
🗡️Jasprit there's no harm in using short cuts
Both methods give same output so why do we need to make it lengthier
+ 1
But why everyone is using
"(Fruit/2)/3 "
If " fruit/6 " did same for all the inputs
+ 1
Read question properly