We do not take any responsability for any user submitted content - Copyright @ Daniel Nøhr

3

Posted by Tester3 at 31-08-2009 16:25:06

Paste

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
 
namespace Størstetal_fortsat 
{ 
    class Program 
    { 
        static void Main(string[] args) 
        { 
           int Whileloop = 1; 
            int TempNumber = 0; 
            int HighNumber = 0; 
            while (Whileloop == 1) 
            { 
                Console.WriteLine("Indskriv dit næste tal: "); 
string input = Console.ReadLine();
if (input == "stop")
{
Whileloop = 0;
                Console.WriteLine("Det største tal er: {0}", HighNumber); 
}
TempNumber = Convert.ToInt32(input);
            if (TempNumber > HighNumber) 
            {  
                HighNumber = TempNumber;  
            } 
 
        } 
         
    } 
} 
}