Assignment Solution
Assignment Solution
Assignment Solution
C : temperature in Celsius
F : temperature Fahrenheit
Algorithm
Step-1: Start
Step-3:F = (9/5 x C) + 32
Step-5: Stop
Flowchart
Start
Input value of C
F=(9/5*C)+32
Print F
Stop
2). No Solution
4).Algorithm & Flowchart to Swap Two Numbers using temporary third
Variable
Algorithm
Step-1: Start
Step-4:TEMP = NUM1
Step-5:NUM1 = NUM2
Step-6:NUM2 = NUM1
Step-8: Stop
Flowchart
Start
Input value of
Num1,Num2
Display Value of
Num1,Num2 before
swap
Temp=Num1
Num1=Num2
Num2=Temp
Display value of
Num1 ,Num2 after
swap
Stop
5). Algorithm & Flowchart to Swap Two Numbers without using third
variable
Algorithm
Step-1: Start
Step-4:A = A + B
Step-5:B = A - B
Step-6:A = A - B
Step-8: Stop
Flowchart:
Start
Input value of
A, B
Display Value of
A, B before swap
A=A+B
B=A-B
A=A-B
Display value of
A,B after swap
Stop
6). Algorithm and draw flowchart that read 10 integers from the keyboard in the range 0- 100,
and count how many of them are larger than 50, and display this result
ALGORITHM
Step1; Start
Step2: Number=0
Step3: For i=1,10
Display Number
Step4:X=-1
Step5: If X<0 and X>100 then
Input X
Step6: If X>50 then
Number=Number + 1
Step7: Go to Step3
Step 8: End
Flowchart
Start
Number=0;
i=1,10
Output
X=-1
Number
Input x
X>50
Number=Number+1;
7). Algorithm & Flowchart to find Factorial of number
Algorithm
Step-1: Start
Step-2:Read number N
Step-3:FACT=1 CTRL=1
Step-4;WHILE (CTRL <= N)
DO
FACT=FACT*I
CTRL=CTRL+1
DONE
Step-5:Display FACT
Step-6: Stop