ICT Assignment 4
ICT Assignment 4
Marks: 100
Name: _Mohammad Ali____________________________________________ Roll No:
i246002________________ Section: _A_______
CLO-03: Illustrate simple coding problems by representing an algorithm in the form of flowcharts
and solve them using C++ constructs.
Task # 1a:
a. Write a program to input any character and check whether it is alphabet, digit or special
character.
b. Determine the shipping cost based on weight and delivery speed:
c. Write a program that takes three integers as input and evaluates them based on the following
rules:
Task 1a
a.
Outputs:
Page 1 of 6
CS-1009 Applications of ICT (EE) / SEC A, B, C / Fall’24 / Assignment -04 / CLO-03 15/10/2024
Marks: 100
Name: _Mohammad Ali____________________________________________ Roll No:
i246002________________ Section: _A_______
b.
Page 2 of 6
CS-1009 Applications of ICT (EE) / SEC A, B, C / Fall’24 / Assignment -04 / CLO-03 15/10/2024
Marks: 100
Name: _Mohammad Ali____________________________________________ Roll No:
i246002________________ Section: _A_______
Outputs:
Page 3 of 6
CS-1009 Applications of ICT (EE) / SEC A, B, C / Fall’24 / Assignment -04 / CLO-03 15/10/2024
Marks: 100
Name: _Mohammad Ali____________________________________________ Roll No:
i246002________________ Section: _A_______
Task #1b:
a. Determine the value in total after each of the following loops is executed:
Task # 2:
a. Construct flowchart and write C++ code for following program:
i. Ask user to enter 10 even numbers. Keep on asking numbers until 10 even numbers are entered.
ii. Find the sum of all even numbers entered by the user.
Example:
User input: 10 -10 2 -2 4 -4 6 -6 20 18
Positive sum = 38
b. Drive the user crazy by insisting they re-enter a particular input no matter what, they enter. Be
creative...
Task # 3:
Ask user to enter the length and width of 5 rectangle boxes to calculate their respective areas. Ensure
that both dimensions are positive; otherwise, an error message will be displayed, prompting you to re-
enter the dimensions until all 5 boxes' dimensions are provided.
Task # 4:
Page 4 of 6
CS-1009 Applications of ICT (EE) / SEC A, B, C / Fall’24 / Assignment -04 / CLO-03 15/10/2024
Marks: 100
Name: _Mohammad Ali____________________________________________ Roll No:
i246002________________ Section: _A_______
Write a C++ program, that check the number entered by the user is prime number or not. Implement
this task using for loop.
Task # 5:
Write a program to print out the binary equivalent of a positive integer value entered. Implement this
task using for loop.
[Reverse binary string is accepted as output. For example, the binary of 4561 is 1000111010001 but if
the user outputs it in reverse, i.e., 1000101110001, it is accepted. Just mention that LSB is the left
most bit]
Task # 6:
Dry run the following code for following values and mention the output.
1. price=1000
2. price=-10
Task # 7:
Answer the following for the given flowchart below.
Page 5 of 6
CS-1009 Applications of ICT (EE) / SEC A, B, C / Fall’24 / Assignment -04 / CLO-03 15/10/2024
Marks: 100
Name: _Mohammad Ali____________________________________________ Roll No:
i246002________________ Section: _A_______
Instructions:
1. Submit the assignment in SOFTCOPY on GCR before the deadline. Implement the code on DevC++.
Submit code and screenshot both.
2. Name the submission document as: CS1009 Fall 24 Assignment 4 CLO3 Roll No (e.g. 23i-0456)
3. Do fill in your name, roll number, and section above.
4. Plagiarism will be penalized severely.
5. Not following the instructions can lead to submission rejection or marks deduction.
6. Submission deadline 26 Nov 2024.
7. Late assignments won’t be accepted.
Page 6 of 6