0% found this document useful (0 votes)
2 views1 page

Programming Assignment Questions

The document contains ten programming assignment questions focused on algorithms, flowcharts, and C++ programming tasks. It includes tasks such as calculating the area of a rectangle, determining even or odd numbers, using conditional statements, loops, and functions. Additionally, it involves array manipulation and calculating averages based on student marks.

Uploaded by

gidionmpali
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)
2 views1 page

Programming Assignment Questions

The document contains ten programming assignment questions focused on algorithms, flowcharts, and C++ programming tasks. It includes tasks such as calculating the area of a rectangle, determining even or odd numbers, using conditional statements, loops, and functions. Additionally, it involves array manipulation and calculating averages based on student marks.

Uploaded by

gidionmpali
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

Programming Assignment Questions (10)

1. Explain the difference between an algorithm and a flowchart, then write an


algorithm and draw a flowchart to calculate the area of a rectangle.
2. Write an algorithm and draw a flowchart to determine whether a number is even or
odd.
3. Write a C++ program using if...else to determine whether a student has passed (50
and above) or failed.
4. Write a C++ program using a switch statement to display the day of the week based
on a number (1-7).
5. Write a program using a for loop to display numbers from 1 to 20 and their sum.
6. Write a program using a while loop to repeatedly accept numbers until the user
enters 0, then display the total sum.
7. Create a function named calculateSquare(int n) that returns the square of a number.
Demonstrate its use in main().
8. Write a function named findLargest(int a,int b,int c) that returns the largest of three
numbers.
9. Declare an array of 10 integers. Write a program to input the values and display the
largest and smallest values.
10. Write a program that stores five student marks in an array, calculates the average
mark using a loop, and displays the result.

You might also like