i am not able to code anything. i dont know where to start. i am confused . And i need to submit it tommrow.
Of course it would have to be "tomorrow" wouldn't it.
How long have you been sitting on the problems, doing nothing about it?
My guess is you've been "phoning it in" for a few weeks now, and now you're way out of your depth. Your "bluff" that you actually know anything is about to be called.
For us to just spoon-feed you 10 ready made answers for your 10 bullet point assignments won't actually fix anything. You'll still be just as clueless next week, only the questions will be harder.
TBH, you need to own the 'F' you're about to get and drop the course.
Come back next semester with a fresh resolve to actually do the work involved, if you're actually serious about wanting to learn.
Until you shake this "do nothing until the last moment, then try and get others to do your work for you" attitude, you deserve to fail.
I can't begin to relate those 1 liners together. What are you trying to do? It looks like old chef skipped the bottle and went right to the rock, to steal a line from a song.
pick one of the easy ones, and give it a try?
anagram is pretty easy.
what do you get if toupper or tolower both strings, sort them with std::sort, take the substrings that only contain letters, and compare them?
lets see...
George Bush
He bugs Gore!
first line is beegghorsu
second line is beegghorsu
matched!
about 10 lines of code total... give it a try?
and the number one is just a lookup table. for every letter in the number as a string, replace it, turn it back into a number if needed... also a 10 liner. And that is just if there is no way to do it with math, there may be a clever way to do it with a subtract or something. Like, what is 999-210 .. and does that work all the time ?