Write a program that will readin three numbers nd output a message indicating whether or not the numbers were entered in ascending numerical order. (Equal entries are regarded as being in order, e.g. 4 4 5 is OK).

First let's see the algorithm....
We need 3 variables for the 3 numbers,right?
We have to check the numbers one by one to see what is bigger or smaller...
And then,alert the user ....

Program orders;
{$APPTYPE CONSOLE}
Uses
SysUtils;
Var a,b,c:Integer;
Begin
Write('a: '); {1.number}
ReadLn(a);
Write('b: '); {2.number}
ReadLn(b);
Write('c: '); {3.number}
ReadLn(c);
{check the numbers}
If (a <= b) And (a < c) And (b <= c) Then WriteLn('Good Order!')
Else WriteLn('Wrong Order!');
ReadLn;
End.
{Created by FlamingClaw 2009.06.06.}

Thank you for your help and I was misunderstanding the question in before. I thought it ask me to swap the numbers if they are not in ascending numerical order.

{
Thank you for your help and I was misunderstanding
the question in before. I thought it ask me to swap
the numbers if they are not in ascending numerical
order.
}
Program Fixed_orders;
{$APPTYPE CONSOLE}
Uses
SysUtils;
Const minimum = 1;
maximum = 3;
Var MyArray:Array[minimum..maximum]Of Integer;
MyI,MyK,MyT:Integer;
Begin
{get the 3 numbers from the user}
For MyI:=minimum To maximum Do Begin
Write(MyI,'. number is: ');
ReadLn(MyArray[MyI]);
End;
{if needed exchange the order}
For MyI:=minimum To maximum-1 Do Begin
For MyK:=MyI+1 To maximum Do Begin
If MyArray[MyK] < MyArray[MyI] Then Begin
MyT:=MyArray[MyK];
MyArray[MyK]:=MyArray[MyI];
MyArray[MyI]:=MyT;
End;
End;
End;
WriteLn;
WriteLn('The results are:');
{write the results}
For MyI:=minimum To maximum Do Write(MyArray[MyI],',');
ReadLn;
End.
{Created by FlamingClaw 2009.06.06}

Is C similar to C# (C-sharp); or are they completely different ? I was wondering if I should begin learning C# and the transition to C will be a tad ...

Write a program that displays all numbers divisible by 3 and 4 within a range entered by user. Display five numbers per line. Numbers are separated by exactly two spaces. ...

Hi guys. I am trying to create a program where the user inputs an integer and the program will cout the nth prime number. Unfortunatly when I try to cout ...