1,105,546 Community Members

A program to print highest value

Member Avatar
joejodre
Newbie Poster
6 posts since Dec 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 
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

.
Member Avatar
Chase.Dangerfield
Newbie Poster
4 posts since Dec 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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;

Member Avatar
joejodre
Newbie Poster
6 posts since Dec 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article