Assignment 1
Assignment 1
Computer Programming
(UCT-145)
Date of allocation of Assignments
Date of Submission of Assignments
3. Create program to find the factorial value of a number. Also write the algorithm
and draw flowchart.
4. Develop a flowchart to find the prime numbers between 1 to 100.
5. Develop an algorithm (a step by step process) for a program to calculate the
sum and average of two numbers entered by the user of the program.
2 Group 1. Write a program in C to make such a pattern like right angle triangle with a
B number which will repeat a number in a row.
2. Create a program to display the n terms of even natural number and their sum.
3. Draw a flowchart to match the following pseudocode. - Give variable num1 a
starting value of 5 - Give variable num2 a starting value of 10 - Add 7 to num2 -
Store the value num1 times num2 in variable num3 - Store the value num2 minus
num1 in num2 - Output num1, num2 and num3
4. Write a C program to find the eligibility of admission for a professional course
based on the following criteria:
Marks in Maths >=65
Marks in Phy >=55
Marks in Chem>=50
Total in all three subject >=180
or
Total in Math and Subjects >=140
5. Write a program in C to display the multiplication table vertically from 1 to n.
3 Group 1. Obtain a temperature in degrees Fahrenheit from the user. If the temperature is
C 80 degrees or more display the message "Go play golf" otherwise, if the
temperature is 70 - 79 degrees display the message "Put on a jacket", otherwise
display the message "It is way too cold." Make a variable list, flowchart, and
perform a desk check using the following values: 95, 72, 50
2. Create a program to print all natural numbers from 1 to n using while loop.
3. Write a program in C to make such a pattern like a pyramid with an asterisk.
*
* * *
* * * * *
* * * * * * *
4. Write a program to accept two integers and check whether they are equal or
not.
5. WAP to add first 7 terms of following series
1/1! + 2/2! + 3/3! + 4/4! +………
4. Group 1. Write a program to read the age of a candidate and determine whether it is
D eligible for casting his/her own vote.
2. Program to count minimum number of denomination for given amount.
3. Create a program in C to read 10 numbers from keyboard and find their sum and
average.
4. Write a program in C that takes minutes as input, and display the total number of
hours and minutes.
5. WAP to generate following output:
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4 3 2 1
2 3 4 3 2
3 4 3
4
7 Group 1. Write a program in C to display the cube of the number upto given an integer.
G 2. Create a program to find the LCM of two numbers.
3. WAP to generate following output:
1
2 1 2
3 2 1 2 3
4 3 2 1 2 3 4
4. Design an algorithm which generates even numbers between 1000 and 2000 and
then prints them in the standard output. It should also print total sum:
5. Write a C program to read roll no, name and marks of three subjects and
calculate the total, percentage and division.