Computer Science, asked by winta, 11 months ago

1. Design an algorithm to swap two inserted numbers.

2. Design an algorithm to calculate the volume of sphere,cube and cylinder.

3. Design an algorithm to find the Area and perimeter of a Rectangle.

4. Design an algorithm to find the area and circumference of a circle.

5. Design an algorithm to find the third angle of a triangle.

6. Design an algorithm that converts kilometers per hour to miles per hour.

7. Design an algorithm to enter length in centimeter and convert it into meter and kilometer.

8. Design an algorithm to print the area of a hexagon and polygon.

9. Design an algorithm to swap first and last digits of any number.

10. Design an algorithm to compute the sum of the two given integers and count the number of digits of the sum value.

#answer using pseudo code and flowchart (pleas)

Answers

Answered by asferno76
0

Answer:

jejjejejjejejejejejejejejejejjjejejejejekkekekekekekek

Explanation:

jkalallalaladjsjejekkdkdkdkekekfkf

Answered by stefangonzalez246
0

Pseudo Code:

1. Design an algorithm to swap two inserted numbers

BEGIN

#define variables and assign values to variables

NUMBER num1 =10, num2=15, temp

#assign num1 to temp

temp=num1

#assign num2 to num1

num1=num2

#assign temp to num2

num2=temp

OUTPUT"number 1:"+num1

OUTPUT"number2:"+num2

2. Design an algorithm to calculate the volume of sphere,cube and cylinder.

int main()

{

float v,r;

printf("enter radius of the sphere:");

scanf("%f",&r);

v=(4*22*r*r*r)/(7*3)

print("VOS: %f\n",v);

return 0;

}

3. Design an algorithm to find the Area and perimeter of a Rectangle.

BEGIN

NUMBER b1,b2,area,Perimeter

INPUT b1

INPUT b2

area=b1*b2

perimeter=2*(b1+b2)

OUTPUT area

OUTPUT perimeter

END

4. Design an algorithm to find the area and circumference of a circle.

BEGIN

NUMBER r, area

INPUT r

area=3.14*r*r

OUTPUT area

END

5. Design an algorithm to find the third angle of a triangle.

BEGIN

int main()

int a,b,c;

Get the input

c=180-(a+b);

Print c

return 0;

END

6. Design an algorithm that converts kilometers per hour to miles per hour.

variable kilometers is double

variable miles is double.

Output "Enter kilometers"

Input kilometers

compute miles = 0.621 * kilometers

Output Kilometers

7. Design an algorithm to enter length in centimeter and convert it into meter and kilometer.

start

Declare Real cm, meter, km

Output "centimeter into Meter and Kilometer Converter"

Output "given length in Centimeter:"

Input cm

Assign meter = cm/100.0

Assign km = cm/100000.0

Output "Length in Meter ="&tofixed(meter,2)&"m."

output"Lenght in Kilometer = "&tofixed(km,2)&" km."

END

8. Design an algorithm to print the area of a hexagon and polygon.

Area of polygon

BEGIN

int main()

floar ar,s,n;

INPUT area of the polygon

INPUT number of sides of the polygon

Assign n

INPUT length of each side of the polygon

Assign s

ar= (n*(s*s))/(4.0*tan((m_PI/n)));

OUTPUT ar

END

Area of Hexagon

BEGIN

int main()

float ar,s;

INPUT get the area of hexagon

INPUT get the side of the hexagon

Assign s

ar =(6*(s*s))/(4*tan(M_PI/6));

OUTPUT ar

END

9. Design an algorithm to swap first and last digits of any number.

BEGIN

int main()

int n, first, last, sum, digits, nn, a,b;

INPUT the numbers to be swapped

INPUT get any number

Assign n

digits = (int)log10(n);

First = n/pow(10,digits);

last = n% 10;

a= first * (pow(10,digits));

b=n%a;

n=b/10;

nn = last *(pow(10, digits))+(n*10+first);

OUTPUT nn

END

10. Design an algorithm to compute the sum of the two given integers and count the number of digits of the sum value.

START

Input n

If n<0

s=0,m=n

repeat until n=0

r=n%10

s=s+r

n=n/10

OUTPUT m,s otherwise not possible

STOP

To Learn More...

  • brainly.in/question/14400526

Similar questions