Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: !!!!!!Help wiriting program in java/C++!!!!!

  1. #1
    Join Date
    Feb 2009
    Location
    Baltimore, MD USA
    Beans
    50
    Distro
    Ubuntu 9.10 Karmic Koala

    Exclamation !!!!!!Help wiriting program in java/C++!!!!!

    Hey guys,
    I need to make a program in either java (which I somewhat know and can compile and run)or C++ (which I have no idea how to compile, run, or write)which will do the following:
    output to a text file
    Code:
    a
    b
    c
    d
    etc...
    x
    y
    z
    1
    2
    3
    4
    etc...
    9
    aa
    ab
    ac
    etc...
    till the combos are 16 characters. If possible, it would be nice to get spaces in and capital letters. My sister who is a full time programmer in C++,Silverlight, etc. decided it was not worth her time, so please, if you can do this please tell me. I don't really care how long it actually takes to write the program, but it would be nice to get something tangible after 3 months of trying to write java programs that don't do squat.

    Thanks!
    Chode

  2. #2
    credobyte is offline Iced Blended Vanilla Crème Ubuntu
    Join Date
    Jun 2009
    Beans
    1,559
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: !!!!!!Help wiriting program in java/C++!!!!!

    Homework ?

  3. #3
    Join Date
    Jun 2009
    Beans
    15
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: !!!!!!Help wiriting program in java/C++!!!!!

    I won't give you the exact code, because if this is homework then that would be cheating...but I will give you a hint. You can use a char type variable, and loop through every possible char using ascii codes (very simple with a for loop), then you can have a nested loop that prints the character a certain amount of times.

    It's actually quite simple once you understand how chars are represented in programming logic. Java should have some built in functions that could help you convert ascii codes to actual characters. Once you've got that it's just a matter of throwing the loops around the print statement to do the work for you.

  4. #4
    Join Date
    Feb 2009
    Location
    Baltimore, MD USA
    Beans
    50
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: !!!!!!Help wiriting program in java/C++!!!!!

    No, this is not homework. As a matter of fact, I dont take any computer related classes at the moment. And did I mention that I have absolutely no knowledge of C++? Oh, and had it been homework, then why would I have said that time was no object?

  5. #5
    credobyte is offline Iced Blended Vanilla Crème Ubuntu
    Join Date
    Jun 2009
    Beans
    1,559
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: !!!!!!Help wiriting program in java/C++!!!!!

    If the *time has no object* and it's not a homework, why not to start shaking your fingers ( as you mentioned, you know a bit of C++ ) ?

  6. #6
    Join Date
    Feb 2009
    Location
    Baltimore, MD USA
    Beans
    50
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: !!!!!!Help wiriting program in java/C++!!!!!

    i thought i just said that i didnt know any C++ 2 times.... and please define "shaking your fingers"
    proof that it is not homework is that i am a freshman in highschool. I cannot do any type of class that involves programming until i'm a jr. And when im a jr, i believe that the only one is AP comp sci.
    the reason i want it is so i can access the routers and servers in my house since the old network admin left no usernames/passwords. I was planning on using hydra, but i am lacking some dictionary files which are mercilessly hard to find. And besides, i use random phrases with letters switched around as passwords. The old admin used street names and numbers, neither of which would come up in a dictionary file.

    an example is my school network login password it uttb heeksc. What word list would you find that on?

    ps

    if you know a way to use an ipod touch as a wifi router over the USB cable (tethering it to a ******* comp), i would greatly appreciate it. I want internet on the gaming rig i just built in my room, but i dont want to put both my video card and network card in on PCI because if you do that they will reduce each other's performance
    Last edited by ChodeOfDoom; September 23rd, 2009 at 01:38 AM.

  7. #7
    Join Date
    Oct 2008
    Location
    Romania - Timisoara
    Beans
    281
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: !!!!!!Help wiriting program in java/C++!!!!!

    First of all please install Code::Blocks and after some digging you should have an easy time, you could visit cplusplus.com/, they have interesting books, or better yet... oopweb.com here you will find many good stuff, c++ is somewhat better if you want to learn, Java is much more unpleasant to begin with, consider that if you know C you kinda know C++, and if you know Java then you know ... well java. You should find this helpfull...
    And try these:
    1) this is a link
    2) just off the record if you grasp the way arrays work you can easly do it with arrays, just save each character you mean to use, and start looping, i really can't think of a more begginer way.
    hope this helped somewhat further in your crusade towards programming...

  8. #8
    Join Date
    Feb 2009
    Location
    Baltimore, MD USA
    Beans
    50
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: !!!!!!Help wiriting program in java/C++!!!!!

    Alas, I tried using arrays. Whin i say i know a little java, that means i know very little. I dont know swing. I can pretty much make crappy command line based games, like tic tac toe and connect 4 with an AI but that is not really practical. I took a program where i used a bubbly sort with strings and tried to use that and an array with a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y, z, but i really got nowhere. I'm sorry i'm so useless, but im into computer hardware, not really programming..

  9. #9
    Join Date
    Oct 2008
    Location
    Romania - Timisoara
    Beans
    281
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: !!!!!!Help wiriting program in java/C++!!!!!

    have you even tried the likns i gave you! It is not that you are useless, but you opened the thread in the first place, just go and read some of that. It is actually the only way, you take some of the books that are on the oop site i gave you, and brainstorm them, after that you can see what book appeals you the most and after that just read and follow the exercises and the tpis, and you will manage, I am sure of that. good luck.

  10. #10
    Join Date
    Apr 2009
    Location
    Houston, TX
    Beans
    916
    Distro
    Ubuntu Development Release

    Re: !!!!!!Help wiriting program in java/C++!!!!!

    Just another suggestion, and I hope I don't getted booed for it, but I have found devshed.com useful in helping with some of my coding questions (of which I have plenty), but this site which I think stands for developers shed is a good source for almost all languages, and then some. You may want to try them out as far as coding goes. Hope this helps, if not, I only wasted the time it took you to read this. Good luck...

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •