Embed presentation
Download to read offline


![Max. Marks : 100 Duration : 3 Hours
Marks Distribution
Program 1 - 20 Marks
Program 2 - 20 Marks
Program 3 - 20 Marks
Viva - 25 Marks
[Pra.Copy + IR] – 15 Marks
Total - 100 Marks](https://image.slidesharecdn.com/programminginc-160518085512/85/Programming-in-c-3-320.jpg)

![Set : A
Qu. 2: Write a program to find the factorial of a given number.
Algorithm : To find factorial of a number.
Step 1: [Take input for variable num]
num=value
Step 2 : [Initialization]
fact = 1, i = num
Step 3 : Repeat step 3 while (i>=1)
i) fact = fact*I
ii) i = i-1
Step 4 : [Display the value of fact]
Print “Factorial is : ” fact
Step 5 : Exit](https://image.slidesharecdn.com/programminginc-160518085512/85/Programming-in-c-5-320.jpg)





The document describes a sample question paper for an examination on programming. It includes 3 programming questions, with one being to write a program to find the factorial of a given number. The question provides an algorithm, flowchart, and sample code to find the factorial of a number by taking input, initializing variables, using a while loop to multiply the number by integers from number down to 1, and outputting the factorial. The code is run and outputs the factorial of 5 as 120.


![Max. Marks : 100 Duration : 3 Hours
Marks Distribution
Program 1 - 20 Marks
Program 2 - 20 Marks
Program 3 - 20 Marks
Viva - 25 Marks
[Pra.Copy + IR] – 15 Marks
Total - 100 Marks](https://image.slidesharecdn.com/programminginc-160518085512/85/Programming-in-c-3-320.jpg)

![Set : A
Qu. 2: Write a program to find the factorial of a given number.
Algorithm : To find factorial of a number.
Step 1: [Take input for variable num]
num=value
Step 2 : [Initialization]
fact = 1, i = num
Step 3 : Repeat step 3 while (i>=1)
i) fact = fact*I
ii) i = i-1
Step 4 : [Display the value of fact]
Print “Factorial is : ” fact
Step 5 : Exit](https://image.slidesharecdn.com/programminginc-160518085512/85/Programming-in-c-5-320.jpg)




