Home Forums C Programming Need help URGENTLY on my assignment (instructions inside)

Viewing 1 reply thread
  • Author
    Posts
    • #2180
      QQOHallalnzkmwh
      Participant

      hi im new to the forums as u can tell..

      ive been reading c++ coding since last week and i’ve just got an assignment from my uni.. im really stuck on what to do..

      as i say.. i suck at coding.. its not my forte but i must do it to pass my course :S

      could sum1 please code this for me, i kno it sounds stupid but i really do need help on this.. i’d b very grateful is sum1 could. so that way i can read it and get a better understanding of what i was supposed to do.

      im supposed to do the following:

      In this program you will first create a string that has the exact content “Hello World.” The command line should have no parameters. The following text lists errors you must detect and a priority of testing. All outputs are a single character followed by a linefeed ( endl in C++ or n in C).

      – If there is more than one parameter the output shall be ‘P’.

      – If the parameter is not an integer the output shall be ‘X’.

      – The input integer is an index into the string where [0]=’H’,[1]=’e’, [2]=’l’ etc. (to make up Hello World) Your program should return the letter pointed to by the number then a linefeed.
      – If the number is not within the string the reply must be ‘Z’.

      so basically your reading from command line and have to process them to produce the output. im supposed to also ouput how many arguments there are. for example ./myoutput 123 435 would b “3” arguments “./myoutput “01234” ” would show 2 arguments and print out “Hello” ( 01234 part of Hello World, 0 = H, 1 = e and so on). minus signs, character letters etc should output with the letter X.

      i kno wut im supposed to b doing.. its just the coding that i dont know. please dont giv me any trouble over this.. im stressed out enough as it is :S. i jus need sum1 to help me code this.. id b very grateful if any1 can do this for me. i have to hav it done by 16th march on monday so ive basically got tomorrow (sunday) to complete this :S

    • #3523
      GWILouisaxwzkla
      Participant

      Not totally sure what you need ( not sure what the ‘p’ condition should be ) but heres a start:

Viewing 1 reply thread
  • The forum ‘C Programming’ is closed to new topics and replies.