0% found this document useful (0 votes)
5 views

Lab-array

Uploaded by

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

Lab-array

Uploaded by

Aisha Shabbir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

CS-114

Fundamentals of Computer Programming

Lab
Arrays practice

NUST Institute
Institute of Geographical Information of Civil
Systems
Engineering (NICE)
Lab Task-1
Write a program that will take 6 positive
integers from the user in an array and then
find the sum and product of all elements of
an array.
Lab Task 2
Take 10 character inputs from user and
store them in an array and print them on
screen.
Lab Task 3

Write a program that takes five numbers from user


and displays them in actual and reverse order.
Lab Task 4
Write a program that adds up two single
dimensional arrays and stores the sum in third
array.
Lab Task 5

Write a program to calculate and display sum of the


following series.
1! + 2! +3! +4! +5! = sum(value)
Note: display the output in the similar format of
example
Lab Task 6

Write a program that takes ten numbers from user


and displays the maximum number.
Lab Task 7

Write a program that takes ten numbers from user


and displays the minimum number.
Lab Task 8 (1-D array)
Write a program that takes ten numbers from user
in an array and sorts them in an ascending order
using selection sort technique.
Lab Task 9 (1-D array)
Write a program that takes ten numbers from user
in an array and sorts them in an ascending order
using bubble sort technique.

You might also like