Latihan Modul 6.4
Nama : Haidi
No.Reg : 49031064
- Ubah format tampilan pada modul di atas dengan menggunakan pengulangan for bersarang, dengan format tampilan sbb :
- // Modul6.4.cpp : Defines the entry point for the console application.
- //
- #include “stdafx.h”
- #include <iostream>
- using namespace std;
- int _tmain(int argc, _TCHAR* argv[])
- {
- for (int j=0; j<=10; j++){
- for (int k=0; k<=j; k++){
- cout << k+j <<‘ ‘;
- }
- cout <<“\n”;
- }
- system(“pause”);
- return 0;
- }