Modul 2.1
http://www.youtube.com/watch?v=y39vNeJJmjo
Listing Program
//Modul 2-1
// Tipe data Dasar.cpp
// Nama : Wulan Kandiani Kusumah Wardani
// NRP : 49013036
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
cout <<"=============================================\n";
cout <<" BELAJAR TIPE DATA \n";
cout <<"=============================================\n";
int X;
X = 10;
cout <<"Contoh Nilai Tipe Bilangan Bulat X = "<< X<< endl<<endl;
double Y;
Y = 123.134;
cout<< "Contoh Nilai Tiipe Bilangan Real Y =" << Y << endl << endl;
char Karakter ='A';
char* Teks ="Kata";
char TEKS [39] = "Teks dengan batas sebanyak 39 karakter";
cout << Karakter <<endl;
cout << Teks << endl;
cout << TEKS << endl << endl;
system ("pause");
return (0);
}
http://www.youtube.com/watch?v=y39vNeJJmjo
Listing Program
//Modul 2-1
// Tipe data Dasar.cpp
// Nama : Wulan Kandiani Kusumah Wardani
// NRP : 49013036
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
cout <<"=============================================\n";
cout <<" BELAJAR TIPE DATA \n";
cout <<"=============================================\n";
int X;
X = 10;
cout <<"Contoh Nilai Tipe Bilangan Bulat X = "<< X<< endl<<endl;
double Y;
Y = 123.134;
cout<< "Contoh Nilai Tiipe Bilangan Real Y =" << Y << endl << endl;
char Karakter ='A';
char* Teks ="Kata";
char TEKS [39] = "Teks dengan batas sebanyak 39 karakter";
cout << Karakter <<endl;
cout << Teks << endl;
cout << TEKS << endl << endl;
system ("pause");
return (0);
}
Tidak ada komentar:
Posting Komentar