Final Presentation
Tasnim Fattal and 2 OthersAreej BitarRasha Al-Assad
#include <iostream>
#include<iomanip>
using namespace std;
int main()
{
cout << setfill('_');
cout << "|"<<"Name"<< setw(15)<<"Animals"<< setw(14)<<"Plant"<<setw(14)<<"Object"<<setw(13)
<<"Song"<<setw(12)<<"Book"<<setw(15)<<"Country"<<"|";
cout << "\n";
cout << "|---------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------|\n";
cout << " Please enter words that start with letter (b)" << endl;
cout << "\n";
string n, a, p, o, s, b, c;
cin >> n;
cin >> a;
cin >> p;
cin >> o;
cin >> s;
cin >> b;
cin >> c;
system("CLS");
cout << "|" << "Name" << setw(17) << "Animals" << setw(16) << "Plant" << setw(16) << "Object" << setw(15)
<< "Song" << setw(14) << "Book" << setw(17) << "Country" << "|\n" ;
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
int n1=n.find("b"),a1=a.find("b"),p1=p.find("b"),o1=o.find("b"),s1=s.find("b"),b1 =b.find("b"),c1 = c.find("b");
if (n1 == 0&&a1==0&&p1==0&&o1 ==0&& s1 ==0&& b1 == 0 && c1 == 0)
{
cout << "|" << n << setw(17) << a << setw(16) << p << setw(16) << o << setw(15)
<< s << setw(14) << b << setw(17) << c << "|" << endl;
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
}
else {
cout << " You entered a wrong one try again" << endl;
cout << " all the words should start with (b)" << endl;
cout << "|" << n << setw(17) << a << setw(16) << p << setw(16) << o << setw(15)
<< s << setw(14) << b << setw(17) << c << "|" << endl;
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
}
cout << " Please enter words that start with letter (T)" << endl;
cout << "\n";
string n2, a2, p2, o2, s2, b2, c2;
cin >> n2;
cin >> a2;
cin >> p2;
cin >> o2;
cin >> s2;
cin >> b2;
cin >> c2;
system("CLS");
cout << "|" << "Name" << setw(17) << "Animals" << setw(16) << "Plant" << setw(16) << "Object" << setw(15)
<< "Song" << setw(14) << "Book" << setw(17) << "Country" << "|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";//اختياري وممكن التعديل عليه
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
int n3 = n2.find("t"), a3 = a2.find("t"), p3 = p2.find("t"), o3 = o2.find("t"), s3 = s2.find("t"), b3 = b2.find("t"), c3 = c2.find("t");
if (n3 == 0 && a3 == 0 && p3 == 0 && o3 == 0 && s3 == 0 && b3 == 0 && c3 == 0)
{
cout << "|" << n2 << setw(17) << a2 << setw(16) << p2 << setw(16) << o2 << setw(15)
<< s2 << setw(14) << b2 << setw(17) << c2 << "|" << endl;
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
}
else {
cout << " You entered a wrong one try again" << endl;
cout << " all the words should start with (t)" << endl;
cout << "|" << n2 << setw(17) << a2 << setw(16) << p2 << setw(16) << o2 << setw(15)
<< s2 << setw(14) << b2 << setw(17) << c2 << "|" << endl;
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
cout << "|---------------------------------------------------------------------------------------------------|\n";
}
}