pada pertemuan 7 membahas tentang array,,dan pada pertemuan itu dosen menyuruh untuk membuat algoritma tentang array,,dan dibuat bersama-sama kelompok tp,dan hasilnya cukup bagus dari kelompok saya,,hanya sedikit lagi menuju sempurna............

# Include <iostream>
# Include <string> using namespace std; int main () { int i; i = 0; while (! (i> 100)) { if (i% 3 == 1 && i% 5 == 1) { } else { cout << i << endl;} i = i +15; } system ("PAUSE"); return 0; } |
# Include <cstdlib>
# Include <iostream> using namespace std; class number { friend ostream & operator << (ostream &, & number); friend istream & operator >> (istream &, & number); public: number () {}; void process () { i = 0; while (! (i> 100)) {If (i% 3 == 1 && i% 5 == 1) { } else { cout << i << endl;} i = i +15; } } private: int i; }; istream & operator >> (istream & in, & enter the numbers) { cout << "Numbers divisible by 3 & 5 =" << endl; in >> masukkan.i; return in; } ostream & operator << (ostream & out, numbers & output) { cout << "Bilangannya is" << keluaran.i << endl; return out; } int main (int argc, char * argv []) { number bil; cin >> bil; bil.proses (); cout << bil; cout << endl; system ("PAUSE"); return 0; } |
# Include <iostream> # Include <string> using namespace std; int main () { raptor_prompt_variable_zzyz string; int p; int l; raptor_prompt_variable_zzyz = "Enter the length:"; cout << endl << raptor_prompt_variable_zzyz; cin >> p; raptor_prompt_variable_zzyz = "Put L:"; cout << endl << raptor_prompt_variable_zzyz; cin >> l; if (p == l) { cout << "Build Such is the square" << endl;} else { cout << "Build Such is the Rectangle" << endl;} system ("PAUSE"); return 0; } |
# Include <cstdlib>
# Include <iostream> using namespace std; bngn_ruang class { friend ostream & operator << (ostream &, bngn_ruang &); friend istream & operator >> (istream &, bngn_ruang &); public: bngn_ruang () {}; void process () { if (p == l) { result = "Wake Such is the Square";} else result = "Wake Such is the Rectangle"; } private: int p; int l; char * result; }; istream & operator >> (istream & in, bngn_ruang & insert) { cout << "Enter the length:" << endl; in >> masukkan.p; cout << "Enter the width:" << endl; in >> masukkan.l; return in; } ostream & operator << (ostream & out, bngn_ruang & output) { cout << "The output is as follows:" << endl << keluaran.hasil; return out; } int main (int argc, char * argv []) { bngn_ruang space; cin >> space; ruang.proses (); cout << space; cout << endl; system ("PAUSE"); return 0; } |