Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

pseudocode

Posted on 1998-12-18
Medium Priority
377 Views
1)writte a pseudocode to accept to string from the user.Compare both of them and display a message indicating whether the string are equal or not.
2)how do we join two string.
0
Question by:joy007
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 11

Expert Comment

ID: 1180567
According to our agreement with EE, we cannot do ther people homework (not to mention it would be unethical).  We can however answer SPECIFIC questions.  So why don't you try to do it yourself and if you get stuck we'll try to help.
0

Author Comment

ID: 1180568
0

LVL 1

Expert Comment

ID: 1180569
delete the question and you will get fully refunded.
in case you dont know psuedocode is the english of programming, not a language but desrcibing what should happen.

like

preccesses it through a calculation 4*x

something similar to this.
0

LVL 10

Accepted Solution

viktornet earned 400 total points
ID: 1180570
Here is how this can be done...

Joining strings....

char *str1 = "Hello ", *str2 = "World";
strcat(str1, str2);

when you do...

cout << str1; the output should be "Hello World" without the quotes...

As far as reading a comparing strings here is an example program...

int main()
{
char str1[10], str2[10]; //You could also have a pointer to the string...
cout << "Please enter a string ==> ";
cin >> str1; //You can also use gets(str1); instead of cin >> str1;
cout << "Please enter another string ==> ";
cin >> str2; //Same goes for this one...
if(!strcmp(str1, str2))
cout << "Wow, the strings you entered are the same";
else
cout << "The strings you entered are different";
return 0;
}

That's about it. If you need more help please say so. Hope this helps!

Cheers,
Viktor
0

LVL 22

Expert Comment

ID: 1180571
viktor, this is a school assignment.  We can provide limited help on an assingment.  Help them to reach the answer, don't give it to them.
0

LVL 10

Expert Comment

ID: 1180572
Oh sorry... I am a beginner my self and that's why when I see a question that I'm capable of asnwering I answer it and most of the time I learn something new, because most of the time I have to a research. This one was easy, but anyone. I'll try not to do it again.

Regards,
Viktor Ivanov
0

LVL 11

Expert Comment

ID: 1180573

>>  am a beginner my self [...]
Dobro pozhalovat.
0

LVL 10

Expert Comment

ID: 1180574
Zdravei Alexo ;o)

btw- I'm not Russian even though I understand some of it...

Cheers,
Viktor
0

LVL 10

Expert Comment

ID: 1180575
oh, and that's not an excuse... I really am a beginner in C++...
0

LVL 11

Expert Comment

ID: 1180576
>> I'm not Russian even though I understand some of it
Inanov sounds russian...

>> oh, and that's not an excuse... I really am a beginner in C++...
Don't worry about it, everybony is allowed one mistake.  Then we shoot them.
0

LVL 10

Expert Comment

ID: 1180577
>>Inanov sounds russian...

Well, it's a Bulgarian name also ;-)

>>Don't worry about it, everybony is allowed one mistake.  Then we shoot them.

Ok, I'll look out for that one :)

Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤
Â¤Â¤Â¤Â¤â€  Viktor Ivanov â€ Â¤Â¤Â¤Â¤
Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤
0

Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, whâ€¦
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why tâ€¦
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relatâ€¦
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses
Course of the Month9 days, 10 hours left to enroll