Solved

pseudocode

Posted on 1998-12-18
11
370 Views
Last Modified: 2012-05-04
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
Comment
Question by:joy007
11 Comments
 
LVL 11

Expert Comment

by:alexo
Comment Utility
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

by:joy007
Comment Utility
i agree with your point of view...thanks for the advise
0
 
LVL 1

Expert Comment

by:The_Brain
Comment Utility
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

reads user input
preccesses it through a calculation 4*x
displays the answer.

something similar to this.
0
 
LVL 10

Accepted Solution

by:
viktornet earned 200 total points
Comment Utility
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

by:nietod
Comment Utility
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 10

Expert Comment

by:viktornet
Comment Utility
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

by:alexo
Comment Utility
Viktor, it also helps reading previous comments...

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

Expert Comment

by:viktornet
Comment Utility
Zdravei Alexo ;o)

Sorry Alexo... I read the comments and I answered it anyway, but that's not the point...

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

Cheers,
Viktor
0
 
LVL 10

Expert Comment

by:viktornet
Comment Utility
oh, and that's not an excuse... I really am a beginner in C++...
0
 
LVL 11

Expert Comment

by:alexo
Comment Utility
>> 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

by:viktornet
Comment Utility
>>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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now