Results 1 to 10 of 10
  1. #1

    Default tabang C# Console Application


    ahm mga dude pa help ko sa sa c# language kuan pa ko beginner pa ko .. naa gi hatag na prob sa ako amo a prof. Menu of Volume Cylinder.cube,sphere. mo ask siya ug answer. tabangi ko ani mga master

  2. #2

    Default Re: tabang C# Console Application

    first of, kabalo ka sa formula sa Volume for Cylinder, Cube and Sphere? Kung wala pa, kana ang unaha ug research. Once done, post what you have started here.

    I'll give you a hint para sayon, create a program that would determine the volume of each(Cylinder, Cube, Sphere). Then combine them into one program later.


    PS:
    dili nako mohatag ug codes ngari kay daghan kaayo masuko diri. No to assignment posts daw.

  3. #3

    Default Re: tabang C# Console Application

    Quote Originally Posted by ChaosOrb View Post
    first of, kabalo ka sa formula sa Volume for Cylinder, Cube and Sphere? Kung wala pa, kana ang unaha ug research. Once done, post what you have started here.

    I'll give you a hint para sayon, create a program that would determine the volume of each(Cylinder, Cube, Sphere). Then combine them into one program later.


    PS:
    dili nako mohatag ug codes ngari kay daghan kaayo masuko diri. No to assignment posts daw.
    yhap kablo ko sa formula sa tanan. ngayo lang ta ko gamay idea.. pero sige mag post ko dire sa ako current program na ako gihimo run.. btw thanks sa reply

  4. #4

    Default Re: tabang C# Console Application

    post lang dri brad hehe, c# console app? gamite lag switch statement pra sa imu menu. dali rana bro =)

  5. #5

    Default Re: tabang C# Console Application

    post dayon kay answeran.

  6. #6

    Default Re: tabang C# Console Application

    Unsa namay update ani? hihihi

  7. #7
    Junior Member
    Join Date
    Jun 2010
    Gender
    Male
    Posts
    35

    Default Re: tabang C# Console Application

    TS wala pakay update dinha, hot kaayo si @ProudMonkey or @niehrx, next time if makakita namo og answer pahibalo sad mo, ..hehehehe..

  8. #8

    Default Re: tabang C# Console Application

    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    
    namespace ConsoleApplication1
    {
        class Program
        {
            static void Main(string[] args)
            {
                const double PI = 3.142;
                double radius = 0;
                double volume = 0;
    
                Console.WriteLine("Choose from the menu:\n"
                                 + "[a] Cyclinder\n"
                                 + "[b] Cube\n"
                                 + "[c] Sphere");
                string choice = Console.ReadLine();
    
                switch (choice)
                {
                    case "a":
                    case "A":
                        Console.Write("Enter Radius: ");
                        radius = double.Parse(Console.ReadLine());
                        Console.Write("Enter Heigt: ");
                        double height = double.Parse(Console.ReadLine());
                        volume = PI * (radius * radius) * height;
                        break;
                    case "b":
                    case "B":
                        Console.Write("Enter Length: ");
                        double length = double.Parse(Console.ReadLine());
                        volume = Math.Pow(length, 3);
                        break;
                    case "c":
                    case "C":
                        Console.Write("Enter Radius: ");
                        radius = double.Parse(Console.ReadLine());
                        volume = (4.0 / 3.0) * PI * Math.Pow(radius, 3);
                        break;
                    default:
                        Console.WriteLine("Invalid Input! Tarunga!");
                        break;
                }
    
                Console.Write("Volume is: " + volume);
                Console.ReadKey();
            }
        }
    }

  9. #9
    Junior Member
    Join Date
    Jun 2010
    Gender
    Male
    Posts
    35

    Default Re: tabang C# Console Application

    @superstar: Ako post para hang TS unto ta, kay wala man mag followup...heheheh....

    On a side note, when the user enters letters for sure it will throw an exception, I think TryParse(...) can be use to avoid the exception. But other than, I guess thats it.

  10. #10

    Default Re: tabang C# Console Application

    yes i know that, pero wala lang nako gi try parse kay ako lang gihatag niya ang basic...
    Quote Originally Posted by iDev View Post
    @superstar: Ako post para hang TS unto ta, kay wala man mag followup...heheheh....

    On a side note, when the user enters letters for sure it will throw an exception, I think TryParse(...) can be use to avoid the exception. But other than, I guess thats it.

  11.    Advertisement

Similar Threads

 
  1. Among Applicant
    By radieux_scablem in forum Humor
    Replies: 4
    Last Post: 09-18-2013, 08:46 AM
  2. C# GUI in Console Application
    By reyarita in forum Programming
    Replies: 6
    Last Post: 01-25-2010, 05:19 PM
  3. which OS/application programs
    By lipam in forum Computer Hardware
    Replies: 14
    Last Post: 05-11-2006, 08:08 PM
  4. Rich Internet Applications or Simple Web Applications
    By cmontoya in forum Websites & Multimedia
    Replies: 0
    Last Post: 06-12-2005, 10:40 AM
  5. tabang bag-0 paku aning istorya .net
    By ghems in forum Support Center
    Replies: 1
    Last Post: 05-30-2005, 10:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top