help with assignment

This is a discussion on help with assignment within the C# Programming forums, part of the General Programming Boards category; I need some help with my assignment Write, compile and run a program to take an integer input and display ...

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    76

    help with assignment

    I need some help with my assignment

    Write, compile and run a program to take an integer input and display the output back by incrementing the input integer by 100, decrementing by 100, multiplying by 100 and dividing by 100 along with proper messages . For example if user enters 200 you should display 300, 100, 20000, 2 respectively. Use +=, -=, *= and /= operators.

    ok where do I start?

  2. #2
    UT2004 Addict Kleid-0's Avatar
    Join Date
    Dec 2004
    Posts
    656
    Does this have to be a GUI form or can it be a command line C# app?

  3. #3
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,109
    Quote Originally Posted by robasc
    I need some help with my assignment

    Write, compile and run a program to take an integer input and display the output back by incrementing the input integer by 100, decrementing by 100, multiplying by 100 and dividing by 100 along with proper messages . For example if user enters 200 you should display 300, 100, 20000, 2 respectively. Use +=, -=, *= and /= operators.


    ok where do I start?
    YOU will start with showing us that you have already written something or did some research... people for your own sake; if you are following a class and they ask you to do an assignment it wont be something you cannot accomplish. Either you never went to the class or you are just too lazy to write it yourself ( and actually i think both will apply on you... ).

    And alright ill give you a clue, you start with opening your compiler and creating a new project . After that you read your assignment, read your books and write some code, when you run into a problem then come and ask for help....

  4. #4
    Registered User
    Join Date
    Feb 2005
    Posts
    76
    I am only working with command line programs
    I am a newbie
    And I am not to lazy I just do not understand the bitwise operators.
    I did in fact write some code:

    Code:
    #include <stdio.h>
    int main(){
        int a;
        
      printf("enter an integer: ");
    scanf("d,&a");
      getchar();
    }

  5. #5
    C(++)(#)
    Join Date
    Jul 2004
    Posts
    309
    Quote Originally Posted by robasc
    I am only working with command line programs
    I am a newbie
    And I am not to lazy I just do not understand the bitwise operators.
    I did in fact write some code:

    Code:
    #include <stdio.h>
    int main(){
        int a;
        
      printf("enter an integer: ");
    scanf("d,&a");
      getchar();
    }
    Erm..may I ask why you put this in the C# forum?

    This really belongs in the C programming forum.
    To code is divine

  6. #6
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,109
    Quote Originally Posted by 7smurfs
    Erm..may I ask why you put this in the C# forum?

    This really belongs in the C programming forum.
    So i was right afterall , he never even looked at the cover of the book hes using in school... Now why doesnt that surprise me
    Besides that the argument that u dont understand these operands is ridiculous given this
    For example if user enters 200 you should display 300, 100, 20000, 2 respectively. Use +=, -=, *= and /= operators.
    Respectively: http://dictionary.reference.com/search?q=respectively

    So if you would try to read your assignment you would know the only thing to understand to this is
    Code:
    //get the number from the user and store it in an int 
    //print the result of input *= 100 input+=100 etc etc ...
    In short input +=100 does the same as input = input +100 , i think you should be able to figure out the rest on your own then , or am i wrong here

  7. #7
    Registered User
    Join Date
    Feb 2005
    Posts
    76
    I did not know there was a difference bettween c and c#

  8. #8
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    Quote Originally Posted by robasc
    I did not know there was a difference bettween c and c#
    There are quite a number of differences. I've provided three links below to Wikipedia's info on C, C++, and C# respectively (heh).

    http://en.wikipedia.org/wiki/C_programming_language
    http://en.wikipedia.org/wiki/C_Plus_Plus
    http://en.wikipedia.org/wiki/C_Sharp...mming_language

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Menu
    By Krush in forum C Programming
    Replies: 17
    Last Post: 09-01-2009, 03:34 AM
  2. Assignment Operator, Memory and Scope
    By SevenThunders in forum C++ Programming
    Replies: 47
    Last Post: 03-31-2008, 07:22 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 03:39 PM
  4. Help with a pretty big C++ assignment
    By wakestudent988 in forum C++ Programming
    Replies: 1
    Last Post: 10-30-2006, 09:46 PM
  5. Replies: 1
    Last Post: 10-27-2006, 02:21 PM

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