TUGAS ALGORITMA DAN STRUKTUR DATA PERTEMUAN 7
Assalamu'alaikum W r.Wb Lampiran Tugas Algoritma Dan Struktur Data Nama : Raihan ramadhan NIM : 3420210009 Prodi : Teknik Informatika Program 1 SCRIPT PROGRAM 1 #include <iostream.h> #include <conio.h> //Nama : Raihan ramadhan //NIM : 3420210009 //Prodi : Teknik Informatika void main () { int i; int a = 15; int b = 20; 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 (7,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+3; b=b+5; cout<<"\n"; } cout<<"------------------------------\n"; getch(); } Program 2 SCRIPT PROGRAM 2 #include <stdio.h> #include <conio.h> #include