Quick actions

cmd+k|ctrl+k

Navigation

Languages

Algoritma Dan Struktur Data Tugas 7.1

Snippet info

Language

Cpp

Visibility

public

Author

fadhlanr

Created

2026-01-04T06:52:13.422109Z

Updated

2026-01-04T06:52:13.422109Z

#include <iostream>
using namespace std;

int main() {
    cout << "No\tA\tB\tA*A\tB*B" << endl;
    cout << "------------------------------------\t\t\t\t" << endl;
    
    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;
    }
    
    cout << "\n----------------------------------" << endl;
    cout << "Nama : M Fadhlan Robbi" << endl;
    cout << "NIM  : 3420240001" << endl;
    
    return 0;
}

//Nama  : M Fadhlan Robbi
//NIM   : 3420240001
INFO