Like Tree1Likes
  • 1 Post By grumpy

Ouput formatting

This is a discussion on Ouput formatting within the C Programming forums, part of the General Programming Boards category; hey, so i am using windows computer and my complier is C++ i need so that the ouput screen looks ...

  1. #1
    Registered User
    Join Date
    Feb 2013
    Posts
    45

    Ouput formatting

    hey, so i am using windows computer and my complier is C++

    i need so that the ouput screen looks like this:

    Our cities include -
    City 1:_____ Athens
    Montreal
    City 2:_____ New York
    Paris


    where we have to enter a city in front of city 1 and 2

    any ideas???

  2. #2
    Registered User
    Join Date
    Feb 2013
    Posts
    45
    this is in accurate
    it should look like the city inputs on one side, and the city list goes on the other side

    but they are both side by side

  3. #3
    Registered User
    Join Date
    Jun 2005
    Posts
    6,678
    Have you considered posting details of your complete requirement in this forum?

    After all, looking at your posts (in this and previous threads) as a set, it appears you are trying to get forum members to do all the work for your project, one step at a time, with no coding effort on your part.
    AndiPersti likes this.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Sunshine, and read this, this, and this before posting again.

  4. #4
    Registered User
    Join Date
    Feb 2013
    Posts
    45
    HEY, i did code it but it didnt work, here's what i have grumpy(are u grumpy all the time)


    printf("\t\t\t\t\t\tOur cities include - \n\t\t\t\t\t\tOttawa\n\t\t\t\t\t\tToronto\n\t\t\t\ t\t\tMontreal\n\t\t\t\t\t\tCalgary\n\t\t\t\t\t\tVa ncouver\n\t\t\t\t\t\tHalifax\n\t\t\t\t\t\tWhitehor se");

    printf("Enter city 1: ");
    gets(city1);

    printf("Enter city 2: ");
    gets(city2);

  5. #5
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Quote Originally Posted by LAMER_CODER View Post
    HEY, i did code it but it didnt work, here's what i have grumpy(are u grumpy all the time)
    Code:
    printf("\t\t\t\t\t\tOur cities include - \n\t\t\t\t\t\tOttawa\n\t\t\t\t\t\tToronto\n\t\t\t\t\t\tMontreal\n\t\t\t\t\t\tCalgary\n\t\t\t\t\t\tVancouver\n\t\t\t\t\t\tHalifax\n\t\t\t\t\t\tWhitehorse");
        
        printf("Enter city 1: ");
        gets(city1);
        
        printf("Enter city 2: ");
        gets(city2);[/QUOTE]
    gets() is so bad it shouldn't be used. Use fgets(stdin, etc...), instead.
    Check out the C Tutorial button at the top of the forum! Lots of good stuff in that tutorial.

    No code tags?? C'mon!!

  6. #6
    Registered User
    Join Date
    Jun 2005
    Posts
    6,678
    Quote Originally Posted by LAMER_CODER View Post
    HEY, i did code it but it didnt work, here's what i have grumpy(are u grumpy all the time)
    I do get grumpy, consistently and justifiably, with people who need to apply more effort in order to learn and solve problems, but instead treat forums as a means of getting other people to do their work.

    Your posts provide compelling evidence that you fall into that category.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Sunshine, and read this, this, and this before posting again.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Ouput In String In Uppercase
    By lowqiumei in forum C Programming
    Replies: 7
    Last Post: 07-29-2008, 09:27 AM
  2. Odd ouput
    By me77 in forum C Programming
    Replies: 14
    Last Post: 04-16-2008, 11:45 PM
  3. Weird Ouput
    By addle_brains in forum C++ Programming
    Replies: 32
    Last Post: 08-18-2007, 05:30 PM
  4. number ouput problem...
    By o0obruceleeo0o in forum C++ Programming
    Replies: 7
    Last Post: 11-17-2002, 06:56 AM
  5. Ouput manipulator
    By Fyodorox in forum C++ Programming
    Replies: 5
    Last Post: 04-23-2002, 12:35 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21