View Single Post
ישן 15-09-06, 15:58   # 3
Ori The Man
משתמש - היכל התהילה
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
מיקום: חיפה
גיל: 34
הודעות: 3,694
שלח הודעה באמצעות MSN אל Ori The Man Send a message via Skype™ to Ori The Man

Ori The Man לא מחובר  

ציטוט:
נכתב במקור על ידי Matchs
אני לומד C# כבר חצי שעה, וכרגע בניתי מחשבון בדיוק למה שאתה רוצה..
הינה הדוגמה, תמשיך כמו שאתה יודע:

PHP קוד:
            int A;
            
int B;
            
char C;

            
Console.WriteLine("Welcome to C# calculator!");
            
Console.WriteLine("Made by Rotem the programmer :P");

            
Console.WriteLine();

            
Console.Write("Please insert the first number: ");
            
int.Parse(Console.ReadLine());

            
Console.Write("Please insert the second number: ");
            
int.Parse(Console.ReadLine());

            
Console.Write("Please insert an action: ");
            
char.Parse(Console.ReadLine());

            switch(
C)
            {
                case 
'+':
                    
Console.WriteLine("The Result: {0} {1} {2} = {3}"ACBA+B);
                    
Console.Read();
                    break;
            } 
תודה רבה!
אבל זה לא נותן לי כלום בלי הסברים חח
אפשר טיפה הסברים איך להשתמש ב case?
וןלפי מה שהבנתי זה רק חיבור :\

Last edited by Ori The Man; 15-09-06 at 16:01..
  Reply With Quote