Exp No: 10.A Validating The Process Flow of Code Using Raptor
Exp No: 10.A Validating The Process Flow of Code Using Raptor
Exp No: 10.A Validating The Process Flow of Code Using Raptor
Date:
AIM:
Draw a flowchart to print and count vowels in a given word and validate the process flow using
RAPTOR.
STEPS INVOLVED:
STEP 1: A string is obtained from the user and the stringlength function is used to calculate the
string length.
STEP 2: 2 variables, counter and character are created and assigned the values 0 and 1
respectively
STEP 4: The condition that whether each character is equal to (a,e,i,o and u) is checked.
STEP 5:If the condition is true, the respective character of the string is returned to user and
displayed as a vowel.
STEP 7: At the end of the program, the counter variable is returned to the user as the total
number of vowels in the string.
FLOWCHART:
Exp No: 10.B VALIDATING THE PROCESS FLOW OF CODE USING RAPTOR
Date:
AIM:
Draw a flowchart to check given number is armstrong or not and validate the process flow using
RAPTOR.
STEPS INVOLVED:
STEP 2:2 variables, sum and n are initiated and assigned the values of 0 and the input number
respectively.
STEP 4: If the condition is not true, a variable remainder is created and assigned the value of the
remainder of n divided by 10.
STEP 5:The variable sum is assigned the value of sum of the variable “sum” and the cube of
“remainder”.
STEP 8: The condition,(sum=num) is analyzed and if true, the number entered by the user is
returned as n Armstrong number.
Date:
STEPS INVOLVED:
STEP 1: 3 variables i,j and k are created and assigned the value 1,1 and 0 respectively.
STEP 3: The condition i>1 and j>1 are analyzed. If not true, a loop is initiated.
STEP 4:Each turn, the remainder of I divided by j is calculated, and if it is equal to zero, the
value of k and j are initiated by 1. When j>i, the loop passes on to condition check.
STEP 5: if the value of k is equal to 2, the value of i is returned as a prime number, and the value
of k is assigned the value of 0.
STEP 6: The value of i is incremented by 1 abd again the condition i>n is checked. Until it is
true, the above mentioned loop is executed.
Date:
AIM:
Draw a flowchart to swap two number and validate the process flow using RAPTOR.
STEPS INVLOVED:
STEP 1: Three variables N1,N2, and TEMP are initiated and assigned the value 0.
STEP 3: TEMP variable is assigned the value of N1 and then N1 is assigned the value of N2.