Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

cmpare to scheme 1. program example; 2. var 3. num1, num2:integer; 4. begin 5. writeln; 6. writeln; 7. write('Enter First number:-'); 8. readin(num1); 9. Write('Enter

cmpare to scheme
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
1. program example; 2. var 3. num1, num2:integer; 4. begin 5. writeln; 6. writeln; 7. write('Enter First number:-'); 8. readin(num1); 9. Write('Enter Second number:'); 10. readin(num2); 11. writeln; 12. if num 1> num 2 then 13. begin 14. writeln('The First Number is greeter'); 15. end 16. else if num 2> num 1 then 17. begin 18. writeln('The Second Number is greeter'); 19. end 20. else 21. begin 22. writeln('The two Numbers are the same'); 23. end; 24. end. program even; var a:integer; begin writeln('even numbers from 0 to 10 '); a:=2; while as=10 do begin writeln('=', a); a:=a+2; end; end. 1. program project; 2. var 3. marks:array[0.4]of integer; 4. i,sum:integer; 5. average:real; 6. begin 7. writeln('Enter array elements:'); 8. for i:=0 to 4 do 9. readln(marks [i]); 10. for i:=0 to 4 do 11. sum:=sum + marks[i]; 12. average:=sum/5; 13. writeln('sum is: ',sum); 14. writeln('average is: ', average); 15. end. 1. program AgeCalculation; 2. var age, b_day, b_month, b_year : integer; 3. var current_day,current_month, current_year : integer; 4. begin 5. write ('Enter the value of birth day: '); 6. readln (b_day); 7. write ('Enter the value of birth month: '); 8. readln (b_month); 9. write ('Enter the value of birth year: '); 10. readin (b_year); 11. write ('Enter the value of current day: "); 12. readin (current_day); 13. write ('Enter the value of current month: '); 14. readin (current_month); 15. write ('Enter the value of current year: '); 16. readin (current_year); 17. age := current_year-b_year; 18. If (b_month>current_month) or ((b_month=current_month) and (b_day>current_day)) then 19. begin 20. age :=age-1; 21. end; 22. writeln ('Your age: ', age); 23. end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

3rd Edition

0128012757, 978-0128012758

More Books

Students also viewed these Databases questions