We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,642 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

A program to print highest value

Hi everyone,plz i need help from anyone to check if this program is writthen correctly

{

    A program to read two values A and B and print the highets value

}

Val A

:

integer

;

Val B:integer

;

Begin A

:

 =10

;


   B:=12

;


   if A

>

     B then
   begin
   writeln 

(



'

   A is highest value

'



)


   end;
   if B

>

  A then
   writeln 

(



'

   B is highest value

'



)

End

.
2
Contributors
2
Replies
6 Hours
Discussion Span
4 Months Ago
Last Updated
3
Views
joejodre
Newbie Poster
6 posts since Dec 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

too much spacing in there here is some c++ pseudo code to help you out
int res = (a>b)? a:b;
cout << rest << endl;

Chase.Dangerfield
Newbie Poster
4 posts since Dec 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

tanx bt its a pascal program...so is the c++ code applicable?? bcz i dnt knw abt c++

joejodre
Newbie Poster
6 posts since Dec 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.2970 seconds using 2.65MB