[OT]How to get my homework done

K

Keyser Soze

Hi, I am a lazy cheat that does not want to know how to write C programs.

I need the members of this newsgroup to complete all my homework assignments
for me.

My teacher really does not care where I get the answers or even if I
understand them.

So, please can you experts just do the work for me and not whine about how
lazy and dishonest I am.

Thank you.
 
M

mensanator

Keyser said:
Hi, I am a lazy cheat that does not want to know how to write C programs.

I need the members of this newsgroup to complete all my homework assignments
for me.

My teacher really does not care where I get the answers or even if I
understand them.

So, please can you experts just do the work for me and not whine about how
lazy and dishonest I am.

Thank you.

Planning on running for president someday?
 
M

Malcolm

Keyser Soze said:
Hi, I am a lazy cheat that does not want to know how to write C programs.

I need the members of this newsgroup to complete all my homework
assignments for me.

My teacher really does not care where I get the answers or even if I
understand them.

So, please can you experts just do the work for me and not whine about how
lazy and dishonest I am.
I friend of mine did that.
His deadline was last Friday, and he came to me about a week before to write
his program for him.
Unfortunately, he knew so little Perl that when I set a program up for him,
with his first name and last name concatenated as an example, he couldn't
extend the example to concatenate two arbitrary strings.
So there was nothing I could do. What I did was to all intents and purposes
cheating, but had I actually written the code for him he would have been
found out, causing a whole host of other problems in his later employment.
 
S

slebetman

Malcolm said:
What I did was to all intents and purposes cheating,

I'd call that teaching. Not that he'd understand what you're trying to
teach him though.
but had I actually written the code for him he would have been
found out, causing a whole host of other problems in his later employment.

If you did THAT, that would be cheating. Helping someone cheat is
cheating.

At least, even if he didn't learn Perl, he learned not to ask you for
help again ;-)
 
S

slebetman

Malcolm said:
What I did was to all intents and purposes cheating,

I'd call that teaching. Not that he'd understand what you're trying to
teach him though.
but had I actually written the code for him he would have been
found out, causing a whole host of other problems in his later employment.

If you did THAT, that would be cheating. Helping someone cheat is
cheating.

At least, even if he didn't learn Perl, he learned not to ask you for
help again ;-)
 
P

pemo

Malcolm said:
I friend of mine did that.
His deadline was last Friday, and he came to me about a week before to
write his program for him.
Unfortunately, he knew so little Perl that when I set a program up for
him, with his first name and last name concatenated as an example, he
couldn't extend the example to concatenate two arbitrary strings.
So there was nothing I could do. What I did was to all intents and
purposes cheating, but had I actually written the code for him he would
have been found out, causing a whole host of other problems in his later
employment.

So, it would have been interesting (!) to see him attempt a conact in C
then!
 
P

pete

Keyser Soze wrote:
So,
please can you experts just do the work for me and not whine about how
lazy and dishonest I am.

I like to do other people's homework
if it's interesting and not too hard.
I'm one of the dangerous people on USENET
that your mother warned you about.
 
D

Default User

pete wrote:

I like to do other people's homework
if it's interesting and not too hard.
I'm one of the dangerous people on USENET
that your mother warned you about.

Worst poem ever.


Brian
 
M

mensanator

Default said:
pete wrote:



Worst poem ever.

A likeable fellow called P_
Posts homework from others for free.
It won't be undone
As long as it's fun,
But that's no way to get your degree.
 
C

Charles Richmond

Keyser said:
Hi, I am a lazy cheat that does not want to know how to write C programs.

I need the members of this newsgroup to complete all my homework assignments
for me.

My teacher really does not care where I get the answers or even if I
understand them.

So, please can you experts just do the work for me and not whine about how
lazy and dishonest I am.

Sure!!! Just post the email and phone number of your professor, and we will
make *sure*
that he receives all the C program homwork.
 
R

Richard Heathfield

(e-mail address removed) said:
A likeable fellow called P_
Posts homework from others for free.
It won't be undone
As long as it's fun,
But that's no way to get your degree.

Cheating novices
Teach ancient gurus to dread
Endless September.
 
D

Dave Vandervies

I like to do other people's homework
if it's interesting and not too hard.

I do too. This is one of my favorites:
--------
#include <stdio.h>
#include <stdlib.h>

typedef struct n{struct n*p1,*p2;int v;}n;n*r_t(n*p,n*i){n*i2,*t1,*t2;int v
;if(!i)return 0;while(p->p2)p=p->p2;i2=i;do{t1=malloc(sizeof*t1);t2=malloc(
sizeof*t2);if(!t1||!t2)return 0;t1->v=t2->v=i2->v;t2->p1=t2->p2=0;t1->p1=i2
;t1->p2=t2;if(t1->p1->p2)t1->p1->p2->p1=t1;if(t1->p1->p1)t1->p1->p1->p1->p2
=t1;i2=t1->p1->p2;}while(i2);i=t1;while(i->p1->p1){i2=i;v=i2->v;while(p->v!=
v&&p->p1->v!=v){i2=i2->p1->p1;if(!i2){fputs("(1)\n",stderr);return 0;}v=i2
->v;}if(v==p->v){if(p->p1){p=p->p1;free(p->p2);p->p2=0;}else{fputs("(2)\n",
stderr);return 0;}if(i2->p1->p1)i2->p1->p1->p1->p2=i2->p1->p2;if(i2->p1->p2
)i2->p1->p2->p1->p1=i2->p1->p1;else i=i2;t1=i2->p2;t2=i2->p1->p1;free(i2->
p1);free(i2);t2->p2->p2=t1;}else{t2=p->p1;if(t2->p1)t2->p1->p2=t2->p2;t2->p2
->p1=t1->p1;free(t2);i2=i2->p1->p1;if(i2->p1->p1)i2->p1->p1->p1->p2=i2->p1->
p2;i2->p1->p2->p1->p1=i2->p1->p1;t1=i2->p2;t2=i2->p1->p2;free(i2->p1);free(
i2);t2->p2->p1=t1;}}if(p->p1||p->p2)fputs("(3)\n",stderr);free(p);if(i->p1->
p1||i->p1->p2)fputs("(4)\n",stderr);t1=i->p2;free(i->p1);free(i);return t1;}
--------
I'm one of the dangerous people on USENET
that your mother warned you about.

I'm an entirely different kind of dangerous people on USENET, the kind
your mother never thought you'd need to be warned about.


dave
(I remember that there was a bug in my first version of that one. I have
no idea whether it's been fixed in the version I have laying around.)
 
?

=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=

#include <stdio.h>
#include <stdlib.h>

typedef struct n{struct n*p1,*p2;int v;}n;n*r_t(n*p,n*i){n*i2,*t1,*t2;int v
;if(!i)return 0;while(p->p2)p=p->p2;i2=i;do{t1=malloc(sizeof*t1);t2=malloc(
sizeof*t2);if(!t1||!t2)return 0;t1->v=t2->v=i2->v;t2->p1=t2->p2=0;t1->p1=i2
;t1->p2=t2;if(t1->p1->p2)t1->p1->p2->p1=t1;if(t1->p1->p1)t1->p1->p1->p1->p2
=t1;i2=t1->p1->p2;}while(i2);i=t1;while(i->p1->p1){i2=i;v=i2->v;while(p->v!=
v&&p->p1->v!=v){i2=i2->p1->p1;if(!i2){fputs("(1)\n",stderr);return 0;}v=i2
->v;}if(v==p->v){if(p->p1){p=p->p1;free(p->p2);p->p2=0;}else{fputs("(2)\n",
stderr);return 0;}if(i2->p1->p1)i2->p1->p1->p1->p2=i2->p1->p2;if(i2->p1->p2
)i2->p1->p2->p1->p1=i2->p1->p1;else i=i2;t1=i2->p2;t2=i2->p1->p1;free(i2->
p1);free(i2);t2->p2->p2=t1;}else{t2=p->p1;if(t2->p1)t2->p1->p2=t2->p2;t2->p2
->p1=t1->p1;free(t2);i2=i2->p1->p1;if(i2->p1->p1)i2->p1->p1->p1->p2=i2->p1->
p2;i2->p1->p2->p1->p1=i2->p1->p1;t1=i2->p2;t2=i2->p1->p2;free(i2->p1);free(
i2);t2->p2->p1=t1;}}if(p->p1||p->p2)fputs("(3)\n",stderr);free(p);if(i->p1->
p1||i->p1->p2)fputs("(4)\n",stderr);t1=i->p2;free(i->p1);free(i);return t1;}

But what if p is NULL?

DES
 
S

Suman

Dave Vandervies wrote:
[...]
This is one of my favorites:
--------
#include <stdio.h>
#include <stdlib.h>

typedef struct n{struct n*p1,*p2;int v;}n;n*r_t(n*p,n*i){n*i2,*t1,*t2;int v
;if(!i)return 0;while(p->p2)p=p->p2;i2=i;do{t1=malloc(sizeof*t1);t2=malloc(
sizeof*t2);if(!t1||!t2)return 0;t1->v=t2->v=i2->v;t2->p1=t2->p2=0;t1->p1=i2
;t1->p2=t2;if(t1->p1->p2)t1->p1->p2->p1=t1;if(t1->p1->p1)t1->p1->p1->p1->p2
=t1;i2=t1->p1->p2;}while(i2);i=t1;while(i->p1->p1){i2=i;v=i2->v;while(p->v!=
v&&p->p1->v!=v){i2=i2->p1->p1;if(!i2){fputs("(1)\n",stderr);return 0;}v=i2
->v;}if(v==p->v){if(p->p1){p=p->p1;free(p->p2);p->p2=0;}else{fputs("(2)\n",
stderr);return 0;}if(i2->p1->p1)i2->p1->p1->p1->p2=i2->p1->p2;if(i2->p1->p2
)i2->p1->p2->p1->p1=i2->p1->p1;else i=i2;t1=i2->p2;t2=i2->p1->p1;free(i2->
p1);free(i2);t2->p2->p2=t1;}else{t2=p->p1;if(t2->p1)t2->p1->p2=t2->p2;t2->p2
->p1=t1->p1;free(t2);i2=i2->p1->p1;if(i2->p1->p1)i2->p1->p1->p1->p2=i2->p1->
p2;i2->p1->p2->p1->p1=i2->p1->p1;t1=i2->p2;t2=i2->p1->p2;free(i2->p1);free(
i2);t2->p2->p1=t1;}}if(p->p1||p->p2)fputs("(3)\n",stderr);free(p);if(i->p1->
p1||i->p1->p2)fputs("(4)\n",stderr);t1=i->p2;free(i->p1);free(i);return t1;}
--------

1. main() would have been most welcome :)
2. what if we have something like:
n node1 = { NULL, NULL, 1 };n node2 = { NULL, NULL, 2 };n node = {
NULL, NULL, 3 };
node.p1 = &node2;node.p2 = &node1;node1.p1 = &node;node1.p2 = &node2;
node2.p1 = &node1;node2.p2 = &node;

Is the above input well (-enough, for the above, that is) formed?
 
D

Dave Vandervies

But what if p is NULL?

Hmm, I should have checked for that as well. Good catch.
If it happens when i!=NULL, though, it means the input is malformed (p and
i are supposed to be different representations of the same data) and it
could reasonably be argued that the input disagrees with the specification
and there's no requirement that the code does something sensible with it.


dave
 
D

Dave Vandervies

Dave Vandervies wrote:
[...]
This is one of my favorites:
--------
#include <stdio.h>
#include <stdlib.h>

typedef struct n{struct n*p1,*p2;int v;}n;n*r_t(n*p,n*i){n*i2,*t1,*t2;int v
;if(!i)return 0;while(p->p2)p=p->p2;i2=i;do{t1=malloc(sizeof*t1);t2=malloc(
sizeof*t2);if(!t1||!t2)return 0;t1->v=t2->v=i2->v;t2->p1=t2->p2=0;t1->p1=i2
;t1->p2=t2;if(t1->p1->p2)t1->p1->p2->p1=t1;if(t1->p1->p1)t1->p1->p1->p1->p2
=t1;i2=t1->p1->p2;}while(i2);i=t1;while(i->p1->p1){i2=i;v=i2->v;while(p->v!=
v&&p->p1->v!=v){i2=i2->p1->p1;if(!i2){fputs("(1)\n",stderr);return 0;}v=i2
->v;}if(v==p->v){if(p->p1){p=p->p1;free(p->p2);p->p2=0;}else{fputs("(2)\n",
stderr);return 0;}if(i2->p1->p1)i2->p1->p1->p1->p2=i2->p1->p2;if(i2->p1->p2
)i2->p1->p2->p1->p1=i2->p1->p1;else i=i2;t1=i2->p2;t2=i2->p1->p1;free(i2->
p1);free(i2);t2->p2->p2=t1;}else{t2=p->p1;if(t2->p1)t2->p1->p2=t2->p2;t2->p2
->p1=t1->p1;free(t2);i2=i2->p1->p1;if(i2->p1->p1)i2->p1->p1->p1->p2=i2->p1->
p2;i2->p1->p2->p1->p1=i2->p1->p1;t1=i2->p2;t2=i2->p1->p2;free(i2->p1);free(
i2);t2->p2->p1=t1;}}if(p->p1||p->p2)fputs("(3)\n",stderr);free(p);if(i->p1->
p1||i->p1->p2)fputs("(4)\n",stderr);t1=i->p2;free(i->p1);free(i);return t1;}
--------

1. main() would have been most welcome :)

--------
int main(void)
{
if(r_t(0,0))
{
fputs("Error: Bad handling of trivial input\n",stderr);
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
--------

But, seriously: it wasn't part of the specification I was working from
when I wrote it, so it didn't make it in.
I'll see if I can find some of my Copious Free Time later this week to
write a decent test driver. (My first attempt failed, and I suspect it
may be because this version didn't correct the bug I found in my first
attempt at it. So I may also end up correcting the code I posted.)
2. what if we have something like:
n node1 = { NULL, NULL, 1 };n node2 = { NULL, NULL, 2 };n node = {
NULL, NULL, 3 };
node.p1 = &node2;node.p2 = &node1;node1.p1 = &node;node1.p2 = &node2;
node2.p1 = &node1;node2.p2 = &node;

Is the above input well (-enough, for the above, that is) formed?

No. Cycles aren't allowed.


dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top