basic programming 2

Do you need academic writing help with your homework? Let us write your papers.


Order a Similar Paper Order a Different Paper

Assignment 1:

Part A. Create a flowchart for the following problem.

Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper Now

Input: three different integers: a, b, c.

output: The greatest from the given three numbers.

For simplicity, we assume that all numbers are different.

Part B.

Find out the outcome of the following pseudo codes

1. [3 marks]

a = 1

While a < 10

print in a line the value of a

a = a + 4

End while

Print “bye”

2. [4 marks]

a = 1

While a < 10

if a mod 2 is 0 then

print in a line “a is even”

else

print in a line “a is odd”

end if

a = a + 3

End while

Print “bye”

3. [4 marks]

a = 2

If a mod 2 is 0 then

While a < 10

print in a line the value of a

a = a + 1

End while

else

While a < 5

print in a line the value of a

a = a + 1

End while

End if

Print “bye”

Part C:

1. [ 4 marks]

Compute the operation number for the following code block:

a = 1

While a < 6

print in a line the value of a

a = a + 1

End while

Print “bye”

2. [4 marks]

Compute the operation number for the following code block:

a = 1

While a < 12

print in a line the value of a

a = a + 3

End while

Print “bye”

3. [5 marks]

Compute the operation number for the following code block:

a = 3

While a < 7

if a mod 2 is 0 then

print in a line “a is even”

else

print in a line “a is odd”

end if

a = a + 1

End while

4. [5 marks]

Compute the operation number for the following code block:

a = 3

If a mod 2 is 0 then

While a < 9

print in a line the value of a

a = a + 1

End while

else

print in a line “this is else part”

End if

Print “bye”

6. [7 marks]

Explain the following nested loop with output.

a = 1

While a < 3

b = 1

While b < 4

print in a line the value of b

b = b + 1

end while

a = a + 1

End While

Our team of vetted writers in every subject is waiting to help you pass that class. With keen editors and a friendly customer support team, we guarantee custom-written, original, high-quality papers. Get top grades.


Order a Similar Paper Order a Different Paper