This programs enhances problem solving skills using c for entry level students
Problem 1: Write a C program to get the integer array from the user and print it in the given order.
Input Format: Input consist of Two lines. First Line contains the number of elements N and the next contains array elements (space separated).
Output Format: Output consist of a single line, display the array elements in the given order with space separated.
Example
input:
5
1 5 10 50 123
output:
1 5 10 50 123
Input Format: Input consist of Two lines. First Line contains the number of elements N and the next contains array elements (space separated).
Output Format: Output consist of a single line, display the array elements( first and second(copied array) array) in the given order with space separated with appropriate statement
Example
input:
3
15 10 12
Output:
The elements stored in the first array are :
15 10 12
The elements copied into the second array are :
15 10 12
Problem 3: Write a C program to get two rows and columns of integers from the user and print them in matrix fashion.
Example
input:
1 2 3 4
Output:
1 2
3 4
Example
input:
Input the number of elements to be stored in the array :3
Input 3 elements in the array : 2 5 8
Output:
Sum of all elements stored in the array is : 15
Problem 5: You will be given an integer array 'arr'. Your task is to print the largest and smallest element in 'arr'.
Example
input:
5 8 10 3 2 6
Output:
Max = 10
Min = 2