Tugas4.1

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> #include <string.h> // Nama : Junita Laras Wati // NIM : 3420230028 using namespace std; int main() { const float phi = 3.14; float radius, area, circumference; char name[50] = "Junita Laras Wati"; char phone[20] = "085691524552"; cout << "--------------------------------------------------------------------" << endl; puts("Program Menghitung Lingkaran"); printf("Nama : %s\n", name); printf("HP : %s\n", phone); cout << "--------------------------------------------------------------------" << endl; printf("Nilai phi adalah %.2f\n", phi); cout << "Masukan nilai jari-jari lingkaran: \n"; cin >> radius; cout << "--------------------------------------------------------------------" << endl; area = phi * radius * radius; circumference = 2 * phi * radius; printf("Nilai jari-jari yang di masukan adalah %.2f\n", radius); printf("Luas lingkaran adalah %.2f dan keliling lingkaran adalah %.2f\n", area, circumference); cout << "--------------------------------------------------------------------" << endl; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines