//created by maiaachiea
//program pythagoras
#include <iostream.h>
#include <conio.h>
#include <stdio.h>
#include <math.h>
void main (){
float nilai_a, nilai_b, hasil;
cout <<"masukkan nilai a : ";cin>>nilai_a;
cout <<"masukkan nilai b : ";cin>>nilai_b;
hasil=sqrt(nilai_a*nilai_a+nilai_b*nilai_b);
cout<<endl;
cout<<"akar dari "<<nilai_a*nilai_a+nilai_b*nilai_b<<" adalah "<<hasil;
}
+ komentar + 1 komentar
semoga bermanfaat buat teman-teman... ^_^
Posting Komentar