-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathp4ca.cpp
28 lines (22 loc) · 804 Bytes
/
p4ca.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* Modul Praktikum GP2103 Metode Komputasi,
Program Studi Teknik Geofisika, Universitas Pertamina
Oleh: Hardianto Rizky Prabusetyo dan Mohammad Heriyanto
Website: https://osf.io/5tfvq/
Link Kode: https://github.com/Metkom/Kode-Praktikum-GP2103-Metode-Komputasi
DOI: 10.17605/OSF.IO/5TFVQ
@ Oktober 2017
*/
// Membaca teks
#include <iostream> // class input/output
#include <fstream> // stream class untuk baca file
#include <string> // memanggil string
using namespace std;
int main () {
string text; // definisi variabel text
ifstream fileku ("prak4.txt");
fileku.is_open(); // buka file
getline(fileku,text); // mendapatkan semua text dari fileku
cout << text << '\n';
fileku.close(); // tutup file
return 0; // mengembalikan nilai ke sistem operasi
}