0% found this document useful (0 votes)
47 views1 page

1) Title:: Flowchart Code #Include Flowchart Code #Include

This document provides an algorithm to calculate the radius of a circle given its area. It defines the variables needed - area as an integer and pi as a float. It explains that the radius R can be calculated by taking the square root of the area divided by pi. The header files needed are math.h for the square root function and stdio.h for input/output. The algorithm has 5 steps: 1) define variables, 2) calculate R, 3) output R, 4) end.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views1 page

1) Title:: Flowchart Code #Include Flowchart Code #Include

This document provides an algorithm to calculate the radius of a circle given its area. It defines the variables needed - area as an integer and pi as a float. It explains that the radius R can be calculated by taking the square root of the area divided by pi. The header files needed are math.h for the square root function and stdio.h for input/output. The algorithm has 5 steps: 1) define variables, 2) calculate R, 3) output R, 4) end.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Objective(s):

 To be familiarwith differentdata type,operation,conditional statements and loops in


programming in c
 To be familiar with diferent data type ,operation ,conditionalstatement and while (for)in C.

1)Title:
1, Write a program that calculate the radius of a circle where area=pi*r2.

Problem Analysis:

This problem is to calculate the redius of a circle with the area of a circle is already given as area
=pi*r^2 having the area(int type),and the value of pi(float type) .the output of the programming is the
redius of a circle .the redius has float data type

The redius of the circle is the square root of area devide by the pi(3.14)

R=squr(area/pi)

Input variable Processing Output variable Neccesserly header


variable/calculation file/functions/macron/
Pi(float)area(int),R(float) R(float) R=sqrt(area/pi) Math.h,stdio.h

Algorithm:

1. Start
2. Define variable(pi,R(float),area(int))and assign values pi=3.14
3. Calculate the value of redius R=sqr(area/pi)
4. Output is the redius(float)
5. Stop
Flowchart code
#include <stdio.h>
1.
Flowchart code
#include <stdio.h>
start
Int main() #innclude <math.h>

Int main()
Area(int),pi(float)

You might also like