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

Tabel #Include #Include #Include

This program uses a for loop to calculate and output the radius, area, and circumference of circles with radii ranging from a minimum to a maximum value, in intervals. It prompts the user to input the minimum radius, maximum radius, and interval. It then calculates and prints the results in a table with the number, radius, area, and circumference of each circle from minimum to maximum.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Tabel #Include #Include #Include

This program uses a for loop to calculate and output the radius, area, and circumference of circles with radii ranging from a minimum to a maximum value, in intervals. It prompts the user to input the minimum radius, maximum radius, and interval. It then calculates and prints the results in a table with the number, radius, area, and circumference of each circle from minimum to maximum.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

TABEL

#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
int i,n;
float JK,JB,INT,R,L,K;
printf("
printf("
printf("
printf("
printf("

=======================================\n");
=
PROGRAM LOOPING
=\n");
=
TABEL LINGKARAN
=\n");
=
Oleh : A.Hidayat Fannani 05123 =\n");
=======================================\n\n");

printf("
printf("
printf("

Jari-jari Terkecil = ");scanf("%f",&JK);


Jari-jari Terbesar = ");scanf("%f",&JB);
Interval
= ");scanf("%f",&INT);

n=(JB-JK)/INT;
printf("\n -------------------------------\n");
printf(" | No | R | LUAS | KELILING|\n");
printf(" -------------------------------\n");
for (i=0;i<=n;i++)
{
R=JK+(i*INT);
L=(3.14)*R*R;
K=(3.14)*(2*R);
printf(" | %2.0d | %3.0f | %6.2f | %7.2f |\n",i+1,R,L,K);
}
printf(" -------------------------------\n");
getch();
}

You might also like