Questions

Write this program please, it is emergency

+
0 Votes
Locked

Write this program please, it is emergency

victor_lmf
Write a C program which defines and calls the following two functions
to demonstrate its use. The prototypes and descriptions are given below.

int square_c(int);

^^^ Will compute the square of the argument and return its value

int lookup_c(char);

^^^ Will check to see whether the argument character is a
alphabet [ uppercase or lower case] and return 0 if so.
The function will return 1 if the argument character is not
a alphabet character.

Define the above functions and use them in your C program.

Thank you soooooooo much for your help, I need this as soon as possible.
Thank you once again!!!!!!!
+
0 Votes
IC-IT

with my homework, bout time you started yours!! ;-)

+
0 Votes
OldER Mycroft

Not even a 'Please' or even a 'Thank You'.

In other words, Not a hope in ****.

+
0 Votes
IC-IT

One minute or less to edit his post after reading yours.
Do you think he is sitting in a test environment or forgot to do the homework?
It is a pretty basic program, but is surely an educational request due to the way they are checking the use of a letter and using that in the If Then Else statement. ;-)

+
0 Votes
Bizzo

I've written the two functions you require and they're displayed below.
Be quick though before the Californian Education System censors my post, as they don't like people cheating on their homework.

Here's the first one:

-----------------------------
int square_c(int);

################################################
# CENSORED by the Californian Education System #
################################################


-----------------------------


And here's the second:

-----------------------------
int lookup_c(char);

################################################
# CENSORED by the Californian Education System #
################################################


-----------------------------


I hope this helps, and good luck with your studies!

+
0 Votes
Jellimonsta

You should have encouraged him to write the code himself, not do it for him!

+
0 Votes
Bizzo

They quickly censored that didn't they.

I truely hope that the OP managed to copy the code before *they* got to it.

+
0 Votes
NickNielsen Moderator

As my Chem professor once said on a particularly bad day [for me], "Party too hearty, class no pass."

+
0 Votes
cmiller5400

YOU must do the work in order to learn. Otherwise you may as well be a monkey banging on a keyboard writing code; either way, I wouldn't hire you knowing your work ethic.

+
0 Votes
jdclyde

where are the pussycats? :0

+
0 Votes
Iam_Mordac

20 Read pages
30 Get a clue
40 Realize you are never going to make it as a programmer
50 Say "Would you like fries with that"
60 Goto 50

Hope this helps! Oh, wait you said 'C'?!? Nevermind.


BTW, your teacher called... he wants you to show your work...

C student cheat.
C program fail.
C student fail.
C haiku fail.

Looks like I'm in the same boat as Vic...

+
0 Votes
Shellbot

i'll just tell my boss i can't do my own work for a bit because your's is so much more important.

Tip of the day for losers:
Its one thing to ask for help..its another to to demand someone do you (home)work for you.

What you should be doing is doing it yourself, and if you can't get it to work, post the code and ask nicely if anyone has the time to help you with it.

Yer gonna make a wonderful emplyee someday..not

+
0 Votes
jck

Having a bad day?

here's an idea...let's go have a pint!

+
0 Votes
Shellbot

..a decent day..
just annoyed at the size of that one balls..

i mean really..nothing wrong with asking for some help..we all do it..but ya do it nicely and you don't demand someone does the entire thing for ya..

ahh..quitting time..i'll go for that pint now :)

+
0 Votes
jck

not much manners in demanding a solution.

wish i was there...i'd be at the pub with ya! :)

+
0 Votes
jdclyde

with MS. They LOVE someone who is not afraid to take someone elses code and claim it as his own. B-) ;\

+
0 Votes
jck

MS advertises here. Don't go getting sued for saying MS lifts other people's code and/or intellectual property.

I'd hate to have to come try and sneak you a beer into jail.

And I'm sure you wouldn't wanna drink it if I had to hide it somewhere!! :^0 lol

+
0 Votes
jdclyde

Rich?s Orange Jack (by Nick Plumber)
I acquired this recipe from a recently paroled friend of mine, Rich, who?d experimented extensively with cellbrewing while serving out his debt to society.

What You?ll Need:
A Sealable Bag
3 Containers of Orange Juice Concentrate
1 ? Cups of Sugar
3 Dinner Rolls
Tap Water

Day 1
The dinner rolls, Rich informed me, are are added for their yeast content, which explains why this recipe takes a third less time than the classic version. While incarcerated he?d mixed this mash in a trash bag ensconced inside a plastic jailhouse footlocker. Lacking such, I used a trash bag and a five-gallon plastic bucket. I combined all the ingredients and I tied off the bag leaving plenty of room for the gasses to expand into. According to Rich?s system I would let it sit for five days, ?burping? the bag once a day to let off the gasses. Rich suggests that the best time to do this is right after lights out, since the guards won?t be by for a while and the odor of fermenting juice is pungent and unmistakable.

Day 2
I didn?t notice much activity. The bag wasn?t filling up with carbon dioxide and I fretted that I hadn?t added enough sugar to get the yeast kick started. I decided to be patient.

Day 3
The bag was slightly swelled, but not enough for me to burp it.

Day 4
The bag was starting to bloat, so I opened it slightly and squeezed. A strong smell, like a screwdriver with the hint of rising bread, filled the room. According to Rich, this was a good sign.

Day 5
I burped the bag again. The odor was getting very sour. Rich had warned me of this, so I added another ? cup of sugar and retied the bag.

Day 6
The moment of truth. I assembled a panel of tasters, opened the bag and peeked inside. A foamy mess of soggy bread floated on top of a thick orange liquid. In the interest of keeping the procedure as authentic as possible, we strained the brew through an old t-shirt. We served it on the rocks with a twist of morbid dread.

The Taste Test
Ivan, after smelling it, refused to drink it until we called his manhood into question. He had a sip, ran straight to the bathroom and threw up.

Not a good sign, to be sure, but the rest of us were made of sterner stuff. It smelled like rotten underwear and looked like Satan?s venereal urine, but this was for drunkard science, by God.

Counting to three, the remaining tasters and I took a drink simultaneously. We grimaced in unison. It tasted exactly as bad as it looked and smelled. Like a screwdriver that?d been sitting in the sun for a week. Baker put his down and refused to have another drink. Dignan took one more tiny sip, shuddered and surrendered.

Which left it all up to me. Bracing myself, I downed the rest of the glass. Remarkably, It stayed down. I sensed that there was a decent amount of alcohol in it but was there enough to give the kind of buzz that would make me forget a five to ten year stretch of hard time?

Sneering with disdain at the shattered panel of tasters, I calmly filled another glass. In the big house they would all be my bitches. I added more ice and let it sit for a moment? chilling it could only help. I tried to put myself in the mental state of a prisoner: I haven?t had a drink in months or longer, and this is all there is. There are no liquor stores, no bars, no bottles of scotch hidden under my roommate?s bed. Nothing. Just monotony, brooding danger and a powerful urge to get out of my head, even for just an hour.

I expelled all my breath and sucked down another glass. Vinegary, yeasty, with a rusty shank of an aftertaste. I was feeling a slight buzz, but I didn?t think I could stomach another glass. It was booze all right, but two glasses was my non-incarcerated limit.

To reward myself I poured a nice glass of whiskey to wash my mouth out and ruminated upon the experiment: It works, yes, but I wouldn?t recommend trying it in any but the most desperate of conditions.--Nick Plumber

+
0 Votes
jimmy-jam

teach a man to fish and he eats for a lifetime... Happy reading!

http://cplus.about.com/

+
0 Votes
Bizzo

Give him internet access and he never does any homework ever again!

+
0 Votes
jimmy-jam

How true...

+
0 Votes
neilb@uk

Set a man on fire and he is warm for the rest of his life.

+
0 Votes
boxfiddler Moderator

because we know some of our students will go for the quick fix everytime. So, just like the last student that tried this routine, you FLUNK.

+
0 Votes
Tony Hopkinson

thumbs up that will take me off 99.

Even I have some standards.

If you can't figure out those two, just give up now.

I mean we are talking about what six lines altogther and that's being uncharacteristically verbose.

+
0 Votes
jdclyde

and he is to stupid and lazy to put forth the effort to get his own work done.

Clearly, he is NOT a programming major. Management material? :0

+
0 Votes
ThumbsUp2

Ain't it the truth? Ha! Management material! I can't type for the tears in my eyes from laughing so hard!