Professional Documents
Culture Documents
Finding The Total and Average of Three Numbers
Finding The Total and Average of Three Numbers
Date:
AIM:
To draw the flowchart for implementing the total and average of three
numbers using raptor tool.
ALGORITHM:
Step:1 Start
Step:3 t=a+b+c
Step:4 av=t/3
Step:6 Stop
Ex:No: Roll No:
Date:
FLOWCHART:
OUTPUT:
Ex:No: Roll No:
Date:
DISCUSSION :
In this flowchart , we got the input as the variables called a,b,c and
via using the variable t , we do the arthimatic operation such as addition . After
we done the operation , the value which was stored in the variable t, got divided
by number 3 , because the task is determained as sum and average of three
numbers . For perform the average arthimatic operation , let we introduce the
variable named “av” . with the help of the variable called “av” , in order to print
the average of the three numbers. In this flow chart we have used seven symbols
for evaluating total and average of the numbers . if we include start and stop
symbols , we got overall 9 symbols.
RESULT:
Thus the flowchart for finding total and average of three numbers is
implemented using raptor tool and output is verified successfully.
Ex:No: Roll No:
Date:
AIM:
To draw the flowchart for implementing the calculation of simple interest and
compound interest using raptor tool.
ALGORITHM:
Step:1 Start
Step:3 si=p*n*r/100
Step:4 ci=p*(1+r)^t-p
Step:6 Stop
Ex:No: Roll No:
Date:
FLOWCHART:
OUTPUT:
Ex:No: Roll No:
Date:
DISCUSSION :
RESULT:
Date:
To draw the flowchart for implementing the calculation of area and perimeter of
different shapes using raptor tool.
ALGORITHM:
STEP 1: Start
STEP 3: Assign a variable to get the choice of shape from the user.
STEP 4: If the choice is, get the dimensions required for square.
STEP 5: Find the perimeter and area of a square and assign it to a variable perimeter and
area.
STEP 8: Find the perimeter and area of a rectangle and assign it to a variable perimeter and
area.
STEP 10: If the choice is 3, get the dimensions required for circle.
STEP 11: Find the perimeter and area of a circle and assign it to a variable perimeter and area
STEP 13:If the choice is 4, get the dimensions required for triangle.
STEP 14: Find the perimeter and area of a triangle and assign it to a variable perimeter and
area.
STEP 16: If the choice is 5, get the dimensions required for parallelogram.
STEP 17: Find the perimeter and area of a parallelogram and assign it to a variable perimeter
and area.
Date:
FLOWCHART:
Ex:No: Roll No:
Date:
OUTPUT:
Ex:No: Roll No:
Date:
DISCUSSION :
The flowchart is made for calculating the area and perimeter of the
given shape , the shape may be circle or square or rectangle and etc,. In this task
we want to determine the formulae for the different shapes . The calculating the
values for different shapes we used separate formulae and separate selection
symbols . while designing the flowchart , first we want to get the what is the
shape from the user and we do the operation as seperate for shapes and finally
print the area for each shapes. For example the given inputs are 30 and 6 and
then it shows or print the output such as perimeter is 22 and area is 30. This is
the way we calculated area and perimeter of five different shapes.
RESULT:
Thus the flowchart for calculating area and perimeter of different shapes is
implemented using raptor tool and output is verified successfully.
Ex:No: Roll No:
Date:
To draw the flowchart for implementing the calculation of area and perimeter of
different shapes using raptor tool.
ALGORITHM:
STEP 1: Start
STEP 7: Stop.
Ex:No: Roll No:
Date:
FLOWCHART:
OUTPUT:
Ex:No: Roll No:
Date:
DISCUSSION:
This flowchart shows the conversion of temperature called from
Celsius to Fahrenheit and from Fahrenheit to Celsius . For this we had a
mathematical formula for both the conversion , we just use this formula in the
assignment box and we calculated very easily. Before doing the operation we
want to get the input from the user as what does he/she want to convert either
from Celsius to Fahrenheit and from Fahrenheit to Celsius . we also want to get
another input such as some value what he/she want to convert. At Last , we had
print that function as convenient for user.
RESULT:
Date:
To draw the flowchart for implementing the biggest of three numbers using raptor
tool.
ALGORITHM:
STEP 1: Start
STEP 8: Stop.
Ex:No: Roll No:
Date:
FLOWCHART:
OUTPUT:
Ex:No: Roll No:
Date:
DISCUSSION:
It is one of the simplest task and so the flowchart is not big . For
finding the biggest number of 3 numbers , first we want to compare the first two
inputs , before this we want use the input function to get the inputs such as a ,b
, c . After comparing the first two input, and then compare third input with the
result of the first two input. Finally the output is produced, which is a largest
number of given number which was the input given from the user . Here no
need to declare the even one variable, because it is not necessary for this task.
RESULT:
Thus the flowchart for finding the biggest of three numbers is implemented using
raptor tool and output is verified successfully.
Ex:No: Roll No:
Date:
To draw the flowchart for implementing the roots of a quadratic equation using
raptor tool.
ALGORITHM:
STEP 1: Start
STEP 2: Get the input of coefficient of x2 (a), coefficient of x(b) and constant(c) from
the user
STEP 4: num1=-b+((b^2-4*a*c)^1/2)
STEP 5: num2=-b-((b^2-4*a*c)^1/2)
STEP 6: RQ1=NUM1/2*a
STEP 7: RQ2=NUM2/2*a
STEP 9: stop
Ex:No: Roll No:
Date:
FLOWCHART:
OUTPUT:
Ex:No: Roll No:
Date:
DISCUSSION
RESULT:
Thus the flowchart for finding the roots of the quadratic equation is
implemented using raptor tool and output is verified successfully.
Ex:No: Roll No:
Date:
AIM:
To draw the flowchart for implementing the exchange of values in two variables
using raptor tool.
ALGORITHM:
STEP 1: Start
STEP 2: Get the input of two numbers A and B from the user.
STEP 8: Stop
Ex:No: Roll No:
Date:
FLOWCHART:
OUTPUT:
Ex:No: Roll No:
Date:
DISCUSSION
The flowchart is made for implementing the exchange of values in two variables
using raptor . Firstly declaring the two input variable a and b and get it from the
user as a input . Assign the temporary variable as wish you want and the next
step is to assign a is equal to b, also assign temporary variable is b .Finally
display the value of a and b which was swapped one by using temporary
variable. For example we used a=4 and b=5 , and the output is a=5 and b=4.
RESULT:
Date:
Counting of Numbers
AIM:
ALGORITHM:
STEP 1: Start
STEP 5: Stop
Ex:No: Roll No:
Date:
FLOWCHART:
Ex:No: Roll No:
Date:
OUTPUT:
Ex:No: Roll No:
Date:
DISCUSSION :
This flowchart is made for counting the numbers as which was given from the
user. We want to choose the array because we want to store n numbers and get
size of the array . Use the loop and assign the value to each index position.
Again get the value of another number from the user and check that number is
located in each index element and if true assign one temporary variable and add
1 in temporary variable if not temporary value is 0.
RESULT:
Date:
Summation of numbers
AIM:
To draw the flowchart for implementing the summation of numbers using raptor
tool.
ALGORITHM:
STEP 1: Start
STEP 5: Stop
Ex:No: Roll No:
Date:
FLOWCHART:
Ex:No: Roll No:
Date:
OUTPUT:
Ex:No: Roll No:
Date:
DISCUSSION:
This flowchart is made for complete the task , the task is finding
the summation for N numbers and to print the summation of the numbers . First
we want add the values which was given from the user, before sum here assign
to the value of is as 0 were array of 1 'i' is 10. Then again assign the s value that
is equal to 1. Also they have to assign the t value as 0. Then they get input and
check the condition if the condition is satisfied it works under true condition.
other wise, it works under the false condition and ends the program by printing
the desired output.
RESULT:
Thus the flowchart for summation of numbers is implemented using raptor tool and
output is verified successfully.
Ex:No: Roll No:
Date:
Factorial computation
AIM:
To draw the flowchart for implementing the computation of factorial using raptor
tool.
ALGORITHM:
STEP 1: Start
STEP 2: Get the input of the number for which factorial has to be found from the user(n).
STEP 8: Stop
Ex:No: Roll No:
Date:
FLOWCHART:
OUTPUT:
Ex:No: Roll No:
Date:
DISCUSSION:
First of all , the flowchart is made for computing the
factorial of the given inputs which was given from the user. At starting , declare
the variable called n and give or assign it as 0 . And then introduce the variable
called factorial for done the task . Declare the end value of the loop as factorial
number. Multiply the given number with temporary variable and store it in
temporary variable for each time until Loop get terminated. At last , Print the
factorial of the number.
RESULT:
Date:
To draw the flowchart for implementing the computation of factorial using raptor
tool.
ALGORITHM:
STEP 1: Start
Date:
FLOWCHART:
OUTPUT:
Ex:No: Roll No:
Date:
DISCUSSION:
This flowchart shows the implementation of the computation
of factorial using raptor tool. First of all we want to declare the variables called
f1 which is equal to the -1 and f2 is equal to the 1 . After get the values you
want . Declare the temporary variable you want and to store the value of sum of
F1 and F2 such as t. Assign F2 to F1 and t to F2 and then do the increment and
print the output each time and that will continue the process until the condition
fails and print the output of the flowchart.
RESULT:
Thus the flowchart for fibonocci series is implemented using raptor tool
and the output is verified successfully.
Ex:No: Roll No:
Date:
Summation series
AIM:
To draw the flowchart for implementing the computation of factorial using raptor
tool.
ALGORITHM:
STEP 1: Start
STEP 2: Get the input from the user to print their summation.
STEP 8: Stop.
Ex:No: Roll No:
Date:
FLOWCHART:
OUTPUT:
Ex:No: Roll No:
Date:
DISCUSSION:
This flowchart shows the summation (addition) of the N
numbers . At first , declare the variable as your wise and get the input as which
he/she (user) want to sum and print the output. And also get the another
variable which is used to terminate the loop. use the condition of I is greater
than and equal to the n , based on this condition number of values to be added .
use the increment in the loop , made the loop as finite . At last , print the desired
output .
RESULT:
Thus the flowchart for summation series is implemented using raptor tool
and the output is verified successfully.
Ex:No: Roll No:
Date:
AIM:
To write and execute a c program for finding the sum and average of three numbers.
ALGORITHM:
CODING:
#include<stdio.h>
int main()
float a,b,c,sum,avg;
scanf("%f%f%f",&a,&b,&c);
sum=a+b+c;
avg=sum/3;
return 0;
}
Ex:No: Roll No:
Date:
OUTPUT :
DISCUSSION :
First of all, declare the header file for using input and output
functions. For this program use the variables a, b, c, sum, avg belongs to the
data type float. Because of the average function. Then print the inputs a, b, c in
order to get the input from the user and use the scanf() function to get a, b, c
from user. And add the three values which will store in sum and print sum. To
get average divide the sum by 3 and store that in avg variable. To display the
result of the task, print the average of three numbers.
RESULT:
Thus the program for finding the sum and average of three numbers
is implemented and output is verified successfully.
Ex:No: Roll No:
Date:
AIM:
To write and execute a c program for calculating simple interest and compound interest.
ALGORITHM:
Step:2 Read the principal amount,rate of interest and number of years from the user.
Step:4 Read the number of times interest applied and time period from the user.
SOURCE CODE :
#include<stdio.h>
#include<math.h>
int main()
float p,n,r,si,ci,t,no;
scanf("%f%f%f",&p,&n,&r);
si=p*n*r;
scanf("%f%f",&no,&t);
Ex:No: Roll No:
Date:
ci=(p*pow((1+r/no),no*t));
return 0;}
OUTPUT:
Ex:No: Roll No:
Date:
DISCUSSION:
The coding is to calculate the compound and simple interest. First,
we want to declare the variables you want in float data type and here we have
used float function “%f” because of float values contain in simple interest and
compound interest. Using the mathematical formula called si=p*r*n and assign
the values, process using the input and after processing, store the values in the
another variable , and print the variables using float() function .
RESULT:
Thus the program for calculating the simple interest and compound
interest is implemented and output is verified successfully.
Ex:No: Roll No:
Date:
To write and execute a c program for finding the are and perimeter of a square.
ALGORITHM:
SOURCE CODE :
#include<stdio.h>
#include<math.h>
int main()
float a,area,perimeter;
scanf("%f",&a);
area=pow(a,2);
perimeter=4*a;
return 0;
}
Ex:No: Roll No:
Date:
OUTPUT :
DISCUSSION:
Here in this program, our task is to find the area and the perimeter of the square.
float function is used because area and perimeter may be in float data type.
“scan %f” is used because we in order of using float function. Then get the
value of “a” from the input and multiple twice or do the power function, we get
area and by multiplying the value of a with 4 will get the perimeter then print
the desired output .you will get the exact output using this coding because of the
float function.
RESULT:
Thus the program for finding the area and perimeter of a square is
implemented and output is verified successfully.
Ex:No: Roll No:
Date:
ALGORITHM 1:
ALGORITHM 2:
CODING 1:
#include<stdio.h>
#include<math.h>
int main()
float c,f;
Ex:No: Roll No:
Date:
scanf("%f",&c);
f=c*9/5+(32);
return 0;
CODING 2:
#include<stdio.h>
int main()
float c,f;
scanf("%f",&f);
c=(f-32)*5/9;
return 0;
OUTPUT 1 :
Ex:No: Roll No:
Date:
OUTPUT 2 :
DISCUSSION :
Here the coding is to convert the given temperature to
Celsius and as well as Fahrenheit to Celsius. Here we used float function
because we are in order of handling input with the temperature. Hereby, first
enter the temperature in Fahrenheit and convert it into Celsius using the
mathematical formula and also there is the function for converting the Celsius to
the Fahrenheit , just change/reverses the formula and print the desired output if
input in Fahrenheit, convert it to Celsius and in the same way convert Celsius to
Fahrenheit if it is on Celsius.
RESULT:
Date:
AIM:
To write and execute a c program for finding the biggest of three numbers.
ALGORITHM :
Step:3 If the value of a is greater than b and c then print a is biggest otherwise goto step 4.
Step:4 If the value of b is greater than a and c then print b is biggest otherwise print c is
biggest.
CODING:
#include <stdio.h>
int main()
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
if((a>b)&&(a>c))
else
if((b>a)&&(b>c))
if((c>a)&&(c>b))
Ex:No: Roll No:
Date:
return 0;
OUTPUT :
Ex:No: Roll No:
Date:
DISCUSSION :
The coding is to find the greatest number among the given three
values. For that first get any three numbers from the user and store it on a
variables, use the selection if it satisfies the If the condition that is mentioned
above then it must print the output as "a is the greater value among us".
otherwise, the condition fails it check the else condition then if it`s true it print
"b is greater" otherwise print it "c is greater" and end execute the required
output.
RESULT:
Thus the program for finding the biggest of three numbers is implemented and
output is verified successfully.
Ex:No: Roll No:
Date:
To write and execute a c program for finding the roots of a quadratic equation.
ALGORITHM :
Step:2 Read the three coefficient values of a quadratic equation from the user.
Step:4 If the value of d is equal to 0, then print roots are real and equal, otherwise if d>0 then
print roots are real and unequal and if d<0 then print roots are imaginary.
CODING:
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main()
int a,b,c,d;
float x,y,z,u,v;
scanf("%d%d%d",&a,&b,&c);
d=(pow(b,2)-4*a*c);
if(d==0)
x=-b/(2*a);
Ex:No: Roll No:
Date:
else
if(d>0)
y=(-b+sqrt(d))/(2*a);
z=(-b-sqrt(d))/(2*a);
else
u=-b/(2*a);
v=sqrt(abs(d));
return 0;
}
Ex:No: Roll No:
Date:
OUTPUT :
Ex:No: Roll No:
Date:
DISCUSSION:
RESULT:
Date:
To write and execute a c program for finding the roots of a quadratic equation.
Step:3 Assign the first value to temporary variable, second value to first value and temporary
variable to first value.
Step:3 Add the two values and assign to first variable, then subtract the b value from a and
assign it to second variable,subtract the b value from a and assign it to first variable.
CODING:
#include <stdio.h>
int main()
int temp,a,b;
Date:
scanf("%d",&a);
scanf("%d",&b);
temp=a;
a=b;
b=temp;
return 0;
#include <stdio.h>
int main()
int a,b;
scanf("%d",&a);
scanf("%d",&b);
a=a+b;
b=a-b;
a=a-b;
return 0;}
Ex:No: Roll No:
Date:
OUTPUT :
Ex:No: Roll No:
Date:
DISCUSSION:
The program is to perform swapping of the two numbers by
using temporary variable. Here we discussed about two problems that is using
temporary variable that is with and without temporary variable. There is not a
big difference between the both. First, program we used the variable which is
“temp” which will denote the value is temporary, we can easily swap them.
whereas 2nd problem does not contain anything. the process under goes by the
mathematical operations such as addition and subtraction. By the way we got
swapped input and print the output.
RESULT:
Date:
ALGORITHM :
CODING:
#include <stdio.h>
int main()
int a,b;
scanf("%d",&a);
b=a*100;
return 0;
}
Ex:No: Roll No:
Date:
OUTPUT :
Ex:No: Roll No:
Date:
DISCUSSION:
RESULT: