Page 1 of 2

C++ Help

PostPosted: Sat Dec 15, 2007 5:47 am
by Bee-Ant
You must make inputs at least 10 datas, character datas. And then make them all sort as ascending alphabet. I mean if you enter char datas such as : Gogo, Sparky, Automail, Spidy, Kall, Darkboy, Makslane, Tekdino...the output should be like this : Automail, Darkboy, Gogo, Kall, Makslane, Sparky, Spidy, Tekdino
My teacher said if I must send this homework next monday, so hurry up!!!(I use Ms Visual C++)
Code: Select all
#include "stdio.h"
#include "conio.h"
void main()
{
    char dat0,dat1,dat3,dat4,dat5,dat6,dat7,dat8,da9;
    printf("Input data 1 : ");scanf("%c",&dat0);
    printf("Input data 2 : ");scanf("%c",&dat1);
    printf("Input data 3 : ");scanf("%c",&dat2);
    printf("Input data 4 : ");scanf("%c",&dat3);
    printf("Input data 5 : ");scanf("%c",&dat4);
    printf("Input data 6 : ");scanf("%c",&dat5);
    printf("Input data 7 : ");scanf("%c",&dat6);
    printf("Input data 8 : ");scanf("%c",&dat7);
    printf("Input data 9 : ");scanf("%c",&dat8);
    printf("Input data 10 : ");scanf("%c",&dat9);
    //until here i dont know how to continue
    getch();
}

Please help me...(if you're the "Score-Hunter" I'll give you +3)

Re: C++ Help

PostPosted: Sat Dec 15, 2007 9:12 am
by Fuzzy
Google "bubble sort". once you learn how it works come back and show the others and I will give YOU some points. And I am sure others will too.

Re: C++ Help

PostPosted: Sat Dec 15, 2007 9:19 am
by Bee-Ant
Still dont know...I'm bad in coding...
Could you post that codes here???
Btw, thanks Pete :D

Re: C++ Help

PostPosted: Tue Dec 18, 2007 8:57 am
by Bee-Ant
Oh...wait...I've got something...OK, I'll try it :D

Re: C++ Help

PostPosted: Tue Dec 18, 2007 3:25 pm
by Spidy
GOOD LUCK bee-ant!!

Re: C++ Help

PostPosted: Wed Dec 19, 2007 2:44 am
by Bee-Ant
Spidy wrote:GOOD LUCK bee-ant!!

Are you going to tease me??? :x
I'm suck in coding :cry:

Re: C++ Help

PostPosted: Wed Dec 19, 2007 5:47 am
by Spidy
Bee-Ant wrote:Oh...wait...I've got something...OK, I'll try it :D

you said i try it so i say u to good luck and u r not good at coding mike will also help u

Re: C++ Help

PostPosted: Fri Dec 28, 2007 7:40 am
by Bee-Ant
Mikey doesnt really understand about C++ :cry:

Re: C++ Help

PostPosted: Fri Dec 28, 2007 12:32 pm
by Troodon
Bee-Ant wrote:Mikey doesnt really understand about C++ :cry:


= I've never found big time/interest to study it. :)

Re: C++ Help

PostPosted: Fri Dec 28, 2007 12:45 pm
by Bee-Ant
It's because your rap

Re: C++ Help

PostPosted: Fri Dec 28, 2007 1:33 pm
by Troodon
Bee-Ant wrote:It's because your rap


Like old wise chinese man said: It's better to rap than kill house lizards.
:lol:

Re: C++ Help

PostPosted: Fri Dec 28, 2007 1:41 pm
by Bee-Ant
Killing house-lizards is more interesting to me...it could train me to kill a demon :lol:

Re: C++ Help

PostPosted: Fri Dec 28, 2007 2:48 pm
by Troodon
:lol:
Perhaps I will agree with you the day I meet a demon.
And I have no choice, I don't have lizards in my house. :wink: :D

Re: C++ Help

PostPosted: Fri Dec 28, 2007 3:03 pm
by Bee-Ant
If I meet real demons I will scream and run away :lol:

Re: C++ Help

PostPosted: Fri Dec 28, 2007 3:41 pm
by Troodon
:lol:
Perhaps I would react the same way when meeting a house lizard...just kidding.