Pertemuan 7 Algoritma dan Struktur data
Assalamualaikum wr.wb Nama: Raihan Fajarahmatan NIM: 3420210010 Prodi: Teknik Informatika Tugas 7.1 void main () { int i; int a = 2; int b = 4; cout<<"------------------------------------------\n"; cout<<" No A B A*A B*B\n"; cout<<"------------------------------------------\n"; for (i=1; i<=10; i++) { gotoxy(2,3+i);cout<<i; gotoxy(6,3+i);cout<<a; gotoxy(12,3+i);cout<<b; gotoxy(17,3+i);cout<<a*a; gotoxy(22,3+i);cout<<b*b; a=a+2; b=b+3; cout<<"\n"; } cout<<"------------------------------------------\n"; getch(); } Tugas 7.2 #include <stdio.h> #include <iostream.h> #include <conio.h> //Nama : Raihan Fajarahmatan //NIM : 3420210010 //Prodi : Teknik Informatika void judul(){ puts("========================================="); puts("\tContoh Array Dime