Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- //Exercise 1
- /*int main()
- {
- int array[6] = { 1, 2, 3, 4, 10, 11 };
- int sum = 0;
- for (int i = 0; i < 6; i++)
- {
- sum = sum + array[i];
- }
- cout << sum << endl;
- system("PAUSE");
- return 0;
- }*/
- //Exercise 2
- /*int main()
- {
- int bobPoint = 0, alicePoint = 0;
- int bobValue[3] = { 5, 6, 7 };
- int aliceValue[3] = { 3, 6, 10 };
- for (int count = 0; count < 3; count++)
- {
- if (bobValue[count] < aliceValue[count])
- {
- bobPoint += 1;
- }
- if (bobValue[count] > aliceValue[count])
- {
- alicePoint += 1;
- }
- }
- cout << "Point of Bob : " << bobPoint << endl;
- cout << "Point of Alice : " << alicePoint << endl;
- system("PAUSE");
- return 0;
- }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement