Need help in C

  • Assignment එකකට C දන්න උදව් කරන්න පුළුවන් කෙනෙක් ඉන්නවද? ටිකක් urgent.

  • Linux Help

    c nam karala na hebei c++ nam karala thiyenawa. mokadda karanna one kiyala dannko kattiya help karai

  • hotel reservation system එකක් හදන්නේ. මට කරන්න තියෙන්නේ කෑම ඔර්ඩර් කරන function එක.total එක final bill එකට calculate වෙන්න ඕනේ.code එකක් හම්බුනා ඒක complex වැඩි. මේ පහල තියන එකේ idea එක අරගෙන GNU GCC Compiler එකට ලියන්න ඕනේ.

  • @Dilshan-Lakshitha Machan first of all this is a community and it's not a place where you get other people to code for free of charge. Even if we wanted to I'm pretty sure most of us don't have enough time but what we can do is help you when you get stuck in some place or you don't know what to do next. Without out giving an effort, there won't be any help.

    Ok now let me give you a basic idea how this should be developed.

    1. Get all the Menu Items and prices into a .txt file

      eg: - Fried Rice 180
      Fried Noodles 200

    2. Using file reading function read them at the start and get it into a 2D array and print them accordingly.

      it should be showed to select. (This may vary according to user's preference)

      1. Fried Rice - Rs. 180
      2. Fried Noodles - Rs 200
    3. Let the user select using the input method. Make sure the above said is in a loop. I prefer while loop.

    4. Each time the user selects an item add it to an array. I recommend using just numbers as you already have food items on another array.

            int foodArr[200] = {2,5,9}
    5. Then at the end of the ordering process when user hits that 999 or Done. Calculate the ordered food array and print it out.

    Try this method and see. Else come back to us and someone else or me would be able to help you.

Log in to reply