Welcome!
Log In
Create A New Profile
Home
>
2010
>
COS111U
> Topic
Advanced
2009 may june exam
Posted by
MOKAUTU
Announcements
Last Post
SoC Curricula
09/30/2017 01:08PM
Demarcation or scoping of examinations and assessment
02/13/2017 07:59AM
School of Computing Short Learning Programmes
11/24/2014 08:37AM
Unisa contact information
07/28/2011 01:28PM
Forums
Messages
New
MOKAUTU
2009 may june exam
April 23, 2010 01:12AM
Registered: 15 years ago
Posts: 14
Rating: 0
To every thats been going thru the pass papers can u plz help me out with question 4c, 5b and 6b. lets share solutions Im willing to post my solution thus far
Reply
Quote
MOKAUTU
Re: 2009 may june exam
April 23, 2010 03:39PM
Registered: 15 years ago
Posts: 14
Rating: 0
#include <iostream>
#include <string>
using namespace std;
string ChangeSentence(string senP)
{
string word = senP;
int position;
position = word.find("he"
;
word.replace(position, word.find("he"
, "theo"
;
return word;
}
int main( )
{
string sen;
cout <<"Type in a sentence : " << endl;
getline(cin, sen, '\n'
;
sen = ChangeSentence(sen);
cout <<" Changed sentence : " << endl;
cout << sen << endl;
system("pause"
;
return 0;
}
Reply
Quote
nhlanhlak
Re: 2009 may june exam
May 06, 2010 02:33PM
Registered: 14 years ago
Posts: 1
Rating: 0
Section B
Question 1.
switch (customerType)
{
case 'S':
discount = amount * 10/100;
break;
case 'D':
discount = amount * 12/100;
break;
case 'P':
discount = amount * 15/100;
break;
case 'O':
if (amount >= 200)
discount = amount * 10/100;
else
discount = 0;
break;
}
finalAmount = amount - discount;
cout << " The final amount after discount is " << finalAmount << endl;
Reply
Quote
Anonymous User
Re: 2009 may june exam
May 07, 2010 12:21PM
Rating: 0
At last am in,"Prince",i have been on da looking class 4 so long
Reply
Quote
Newer Topic
Older Topic
Print View
RSS
Sorry, only registered users may post in this forum.
Click here to login