Posted by : Unknown
Thursday, December 14, 2017
hallo sobat TI! kali ini saya akan membahas menghitung luas alas permukaan dan volume kerucut dengan dev c++
langsung saja source codenya;
langsung saja source codenya;
#include <iostream>
#include <conio.h>
#define phi 3.14
using namespace std;
#include <conio.h>
#define phi 3.14
using namespace std;
int main(){
float r_alas, r_selimut, t, volume_krucut, luas_alas, luas_selimut;
float r_alas, r_selimut, t, volume_krucut, luas_alas, luas_selimut;
cout<<“maksukkan jari jari alas = “;
cin>>r_alas;
cout<<“maksukkan jari jari selimut = “;
cin>>r_selimut;
cout<<“masukkan tinggi kerucut = “;
cin>>t;
cin>>r_alas;
cout<<“maksukkan jari jari selimut = “;
cin>>r_selimut;
cout<<“masukkan tinggi kerucut = “;
cin>>t;
luas_alas=phi*r_alas*r_alas;
volume_krucut=luas_alas*t;
luas_selimut=phi*r_selimut*r_selimut/3;
volume_krucut=luas_alas*t;
luas_selimut=phi*r_selimut*r_selimut/3;
cout<<“luas_alas adalah “<<luas_alas<<endl;
cout<<“volume_krucut “<<volume_krucut<<endl;
cout<<“luas permukaan krucut “<<(luas_selimut+luas_alas);
getch();
}
cout<<“volume_krucut “<<volume_krucut<<endl;
cout<<“luas permukaan krucut “<<(luas_selimut+luas_alas);
getch();
}
program factorial bilangan dengan dev c++
#include <iostream> using namespace std; int main() { int b,c; cout<<“program oleh suparto”<<endl; cout<<“masukk...