0% found this document useful (0 votes)
3 views2 pages

Problem Solving in Civil Engineering

The document outlines a tutorial for a problem-solving and algorithmic thinking course in civil engineering, specifically focusing on Fibonacci series generation and reversing a number. It includes a programming exercise where students must fill in the blanks for a Fibonacci program and identify bugs in a number reversal program. Each section is allocated a total of 10 marks.

Uploaded by

dakshannord5
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Problem Solving in Civil Engineering

The document outlines a tutorial for a problem-solving and algorithmic thinking course in civil engineering, specifically focusing on Fibonacci series generation and reversing a number. It includes a programming exercise where students must fill in the blanks for a Fibonacci program and identify bugs in a number reversal program. Each section is allocated a total of 10 marks.

Uploaded by

dakshannord5
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

23CSE108 PROBLEM SOLVING AND ALGORITHMIC THINKING

DEBUG/TUTORIAL-OCTOBER 2025
CIVIL ENGINEERING
SET 2
Total=10 marks

1. Identify the program and Fill in the blanks with the required statements.
[5 marks]

1️⃣ Start
2️⃣ Declare variables: n, first = ________, second = ______, next, i
3️⃣ Print "Enter the number of terms:"
4️⃣ Read n
5️⃣ Print "Fibonacci Series:"
6️⃣ Print first, second
7️⃣ For (i = 3; _______________; i++)
a) next = _______________
b) Print next
c) first = _______________
d) second = _______________
8️⃣ End For
9️⃣ Stop

2. Identify the bugs and rewrite the correct program.


[5 marks]
Step 1:Start
Step 2:Declare num, rev, rem
Step 3:Print "Enter a number:"
Step 4:Read num
Step 5:While num > 0
Step 5.1: rem = num % 10
Step 5.2: rev = rev + rem * 10
Step 5.3: num / 10
Step 6: End While
Step 7:Print "Reverse number =", num
Step 8:Stop

You might also like