Terry E Snyder Jr
&  
RemoteWebs.com  

Computer & Web Solutions

Support, Design, and more...
| | |
December 04th, 2024 1:37:09 AM

Questions you should know about PASCAL if you want to get ahead.

Complete the all of the question in 60 minutes or less.  Total points for test are 150.  For answers to the questions E-Mail programhlp and ask for answers to test #1291998P

 

 

1)    Write a procedure that will give you the fibonacci series to a given amount of iterations.

 

2)    Write a function that will return true it the number you pass in is a prime number, and false if the number is not prime.

 

3)    Write a program that will use a procedure to create 100 random numbers, a function to return the mean of the numbers.  Then write a procedure to sort the numbers from greatest to lowest.  Write a procedure to print them out from lowest to greatest.

 

4)    What is wrong with the following code?

Program main(vaule:Integer);

var

   num1 : Integer;

   begin

     if vaule > num1 then begin

         println("num1 > value")

    end

    readln(num1)

   end.

 

5)    What value is stored in a, by the following statment if, f = 3, g = 2, r = 18, e = -24?

        a := (f*g)+(r-e) = (r-e)+(f*g)

 

6)    Write a program that finds the sqare root of a given number N using this equation NG = .5(LG + N/LG).  Use a looping sturcture until the differance between NG and LG is less than 0.005 (Delta).

Google
 
Web www.terryesnyderjr.com
www.remotewebs.com

Page Updated on August 23, 2020 22:47

www.terryesnyderjr.com Copyright 2000-2024©