contoh 7.1

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; int main() { // Header tabel cout << "No\tA\tB\tA*A\tB*B" << endl; cout << "---------------------------------------\t\t\t\t" << endl; // Data rows for (int i = 1; i <= 10; i++) { int A = 2 * i; int B = 3 * i + 1; int A2 = A * A; int B2 = B * B; cout << i << "\t" << A << "\t" << B << "\t" << A2 << "\t" << B2 << endl; } // Garis pemisah dan identitas cout << "----------------------------------------" << endl; cout << "Nama : Farrel Adhysta Pradana" << endl; cout << "Nim : 3420240008" << endl; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines