This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main(args: Array<String>){ | |
var gaji: Int = 0 | |
var hadir1: Int = 0 | |
var ksgaji: Int = 0 | |
var pajak: Int = 0 | |
var gajiakhir: Int = 0 | |
println("PROGRAM GAJI KARYAWAN") | |
println("==============================") | |
println("Kode Bagian :") | |
println("[1] Programmer") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <iostream> | |
using namespace std; | |
int main() { | |
char op; | |
float num1, num2; | |
cout << "Enter operator: +, -, *, /: "; | |
cin >> op; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
float a,b,c,d,e,f; | |
cout<<"Masukan Nilai A: "; | |
cin>>a; | |
cout<<"Masukan Nilai B: "; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <conio.h> | |
using namespace std; | |
int main(){ | |
int a=8,b=4,x=8,y=4; | |
printf("\n Nilai A = %d",a); | |
printf("\n Nilai ++A = %d",++a); | |
printf("\n Nilai A = %d",a); | |
printf("\n Nilai B = %d",b); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <conio.h> | |
using namespace std; | |
int mainp(){ | |
int m=15, n=7; | |
if(m>n) cout<<m<<" Lebih besar dari "<<n<<endl; | |
else if (m<n) cout<<m<<" Lebih Kecil dari "<<n<<endl; | |
if(m=n) cout<<m<<" Sama dengan "<<n<<endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
float phi = 3.14; | |
float r = 7; | |
float L = phi * r * r; | |
cout << "Luasnya lingkaran dengan jari-jari " << r << " adalah " << L ; | |
return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
float Alas, Tinggi, Luas_Segitiga; | |
cout<<"Masukkan Nilai Alas Segitiga: "; | |
cin>>Alas; | |
cout<<"Masukkan Nilai Tinggi Segitiga: "; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main(){ | |
int x, y; | |
std::cout << "Masukan sebuah bilangan bulat : "; | |
std::cin >> x; | |
std::cout << "Masukan sebuah bilangan lain : "; | |
std::cin >> y; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main(){ | |
char nilai; | |
cout << "Please insert a grade (A, B, C, D or E): "; | |
cin >> nilai; | |
switch(nilai) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int angka = 0; | |
// perulangan for | |
cout << "Perulangan menggunakan for: " << endl; |
OlderNewer