5 6260246237891527641
5 6260246237891527641
5 6260246237891527641
Start
Enter n numbers
I<=n sum=sum+i
Avg= sum/n
Stop
Algorithm: -
Step 1 -Start
Step 2- Enter n
Step 4- Avg=sum/n
Step 6-Stop
2-
Start
Input A,B
A+A+B B=A-B
A=A-B
Print A,B
Stop
Algorithm: -
STEP 1: START
STEP 2: ENTER A, B
STEP 3: PRINT A, B
STEP 4: A = A + B
STEP 5: B= A - B
STEP 6: A =A - B
STEP 7: PRINT A, B
STEP 8: END
3-
Start
Read n1,n2,n3
Max=(n1>n2)?(n1>n3:n3):(n2>n3?n2:n3);
Print Max
Stop
Algorithm: -
Step 1 -Start
Step 5-Stop
4-
Start
NO
Stop
Algorithm: -
Step 1: Start
Step 5: Stop
Start
5-
Input A,B,C
NO If A>B YES
If B>C NO NO If A>C
YES
YES
Stop
Algorithm: -
Step 1. Start
Step 4. Stop
6-
Start
Declare variable ch
Assign
vowels to NO
diff cases
YES
Step 1: Start
Step 4: Checking both lower and upper case vowels and assigning
each of them to different case.
IF case matches
Print "Vowel"
Default:
Print "Consonant"
Step 5: Stop
7-
Start
Read number
TRUE
Write even
number
Stop
Algorithm: -
Step 1- Start
Step 2-Input number from user. Store it in some variable say num.
Step 3-Switch the even number checking expression i.e. switch(num % 2).
Step 4-The expression (num % 2) can have two possible values 0 and 1. Hence
write two cases case 0 and case 1.
Step 5-For case 0 i.e. the even case print "Even number".
Step 6-For case 1 i.e. the odd case print "Odd number"
Step 7- Stop
8-
Start
Declare variable
Print sum
Stop
Algorithm: -
Step 1: Start
Step 7: Stop
9-
Algorithm: - Start
Step 1- Start
Step 3-Read the three integer values in num1, num2, and num3 (integer
variables).
Declare variables
Step 4-Check if num1 is greater than num2.
Print largest
Stop
10-
Start
Read number
I=1 fact=1
Is i<=n NO
YES
Print fact
Fact = fact *1
Stop
I=i+1
Algorithm: -
Step 1: Start
Step 5: Stop
factorial(n)
Step 2: Else
f=n*factorial(n-1)
Step 3:
Return f
Start
Read r,c,p,A[][]
and B[][]
i=0,j=0
yes yes
i<r j<c C[i][j]=A[i][j] + B[i][j]
no
no
i=0,j=0 j=j+1
Print C
End
Algorithm:
Step 1: Start
C[i][j]=A[i][j] + B[i][j]
Set j=j+1
Step 7: Stop
Start
Enter a Number
If Number
%2==0
Yes No
Stop
Algorithm:
READ number
remainder=number%2
IF remainder==0
WRITE "Even Number"
ELSE
WRITE "Odd Number"
ENDIF
Start
Read Str
Print length
End
Step 1 -The string is nothing but an array of characters.
Step 2-Read the entered string using gets() function and store into the
character array s[].
Step 3 -The while loop iterates from the first character to the last character
of the array. i.e. the last character of the array is null.
while
(Str[Length] != '\0')
True
False
Length++
Start
Read i,n,a[100]
for(i=0; i< n;
i++)
True
False
Print Sum
Print average
End
START
STOP
Start
For(i=0;i<5;++i)
False
True
For(i=0;i<5;++i)
Print firstName,roll,marks
End
Step 1- Start
Step 5- Stop
Start
Sum=n1 + n2 + n3
+ n4 + n5
Avg=Sum/5
Print Avg
Stop
Algorithm
Step 1- start
Step 2-input the sum.
Step 3- sum( n1+ n2+ n3).
Step 4- AVG sum/3.
Step 5- print avg.
Step 6- stop.
Start
Input a,b
If(a==b)
True
False
Print result
Stop
Algorithm
Step 1- start
Step 2-input numbers
Step 3- check if(a==b)
Step 4- print 1 for true and 0 for false
Step 5- stop.
Start
Initialize variables
like int a, float b
Input from
user a,b
Use sizeof(a)
Display size
End
Algorithm
Step 1- start
Step 2-declare variables with keywords
Step 3- Input value of variables
Step 4- use sizeof function
Step 5- print size of variables
Step 6- stop.
Start
Stop
Print first
no. is largest
Start
Declare n1,n2
Input n1, n2
Expression 1
False True
Expression 3 Expression 2
Print expression
Stop
Algorithm
Step 1- start
Step 5- stop.