TestChatGPT1

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> #include <iomanip> using namespace std; int main() { // Print header std::cout << "------------------------------------------------------\n"; std::cout << " No A B A*A B*B\n"; std::cout << "------------------------------------------------------\n"; int A = 2; int B = 4; // Loop to generate values for (int i = 1; i <= 10; i++) { //int A = i * 2; //int B = i * i; std::cout << std::setw(3) << i << " " << std::setw(4) << A << " " << std::setw(4) << B << " " << std::setw(6) << A * A << " " << std::setw(6) << B * B << "\n"; A = A + 2; B = B + 3; } // Print footer std::cout << "------------------------------------------------------\n"; std::cout << "Nama : Irsyad Purbha\n"; std::cout << "Email : irsyadpurba.fst@uia.ac.id\n"; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines