Fruit Bowl C# Problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Fruit Bowl C# Problem

https://code.sololearn.com/c4QK6qeDX4IG/?ref=app I made a program but it doesn't work WHY? 🤔 What's the problem?

18th Sep 2020, 6:06 PM
Unknown
Unknown - avatar
4 Answers
+ 4
You can make very simple i changed little bit . using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { // Takin' input int fruit; fruit = Convert.ToInt32(Console.ReadLine()); // Calculation int apples = (fruit / 6); Console.WriteLine(apples); } } }
18th Sep 2020, 6:11 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 2
Read statement first what question saying If you have 26 pieces of fruit, you have 13 apples, which makes 4 pies, and leaves one apple left over. Total 26 pieces if you divide by 2 then u will get half half 13-13 and 3 apple make 1 pice and if you divide 13/3 then you will get 4 pices over 13 and left 1 that the statement you can do simple for better understanding (fruit/2)/3
19th Sep 2020, 8:41 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
Why you are dividing it to 6
19th Sep 2020, 8:26 AM
Unknown
Unknown - avatar
0
Thnx Jasprit I understood and solved just now After 9 hours 😆 and yes I'm slow learner
19th Sep 2020, 6:22 PM
Unknown
Unknown - avatar