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

Computer Project

Uploaded by

krsujal66
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Computer Project

Uploaded by

krsujal66
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Computer project

Question 1

Write a program to accept roll numbers and the marks secured in computer application by
40 student of a class in two single dimension arrayy. Sort this mark in descending order
and corresponding roll numbers. Finally display the role number and the marks of each
students in sorted order side by side.

Question 2

Write a program to accept 20 numbers in a single dimensional array array[20] . Transfer and
store all the even number in an array even and all the odd numbers in another array odd.
Finally print the elements of both arrays.

Question 3

A metropolitan hotel has five floors and 10 rooms in each floor. The name of the visitors are
entered in a double dimensional array as M [5][10]. The hotel manager want to know from
the enquiry about the position of a visitor ( i.e floor number and room number) as soon as
he enter the name of the visitor. Write a program to perform the above task.

Question 4

Given below are two arrays-

A[5]= {1, -3, -6, 8, 13};

B[5]={0,3,18,21,17};

Write a program that combines both the arrays into another array C and produce the output
as follows-

C[10]={1,0,-3,3,-6,18,8,21,12,17};

Question 5

Write a program to input 10 words in an array. Arrange the name in alphabetical order
using Selection sort

Question 6

Write a program to input N number of numbers in a integer array and exchange the value
of the first half with the second half of the array . Program should print the elements of the
array after exchange.

Question 7
Write a program to print the sum of negative numbers, sum of positive even numbers and
sum of positive odd numbers from a list of numbers (N) entered by the User .

Question 8

Write a program that outputs the results of the following evaluations based on the number
entered by the user.

(i) Natural logarithm of the number

(ii) Absolute value of the number

(iii) Square root of the number

(iv) Random numbers between 0 and 1.

Question 9

Using a switch statement, write a menu driven program to convert a given temperature
from Fahrenheit to Celsius and vice versa. For an incorrect choice, an appropriate error
message should be displayed.

(HINT: C = 5/9x (F-32) and F = 1.8 x (C+32)

Question 10

Write a program to calculate and print the sum of each of the following series:

(a) Sum (S) = 2 – 4 + 6 – 8 + - - - - 20

(b ) Sun (S) =x/ 2 + x/5 + x/8 + x/11 + x/14 + x/17 + x/ 20

(Value of x to be input by the user).

Question 11

Write a menu driven program to accept a number and check and display whether it is a
prime number or not OR an automorphic number or not. (Use switch- case statement)

(a) Prime number: a number is said to be a prime number if it is divisible only by 1 and itself
and not by any other number.

Example: 3, 5, 7, 11, 13 etc.,

(b) Automorphic number: An automorphic number is the number which is contained in the
last digit(s) of its square.
Example 25 is an automorphic number as its square is

625 and 25 is present as the last two digits.

Question 12

The annual examination results of 50 students in a class is tabulated as follows:

Roll No. Sub.A Sub.B Sub.C

---------- -------- ------- -------

_ _ _ _

_ _ _ _

_ _ _ _

Write a program to read the data, calculate and display the following:

(a) Average marks obtained by each student.

(b) Print the roll number and average marks of the students whose average mark is above
80.

You might also like