help, cprograming

This is a discussion on help, cprograming within the C Programming forums, part of the General Programming Boards category; i am having a problem with trying to write a program where i am supposed to input two integers that ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    13

    Question help, cprograming

    i am having a problem with trying to write a program where i am supposed to input two integers that are multiples of each other and will print. if not a multiple it will not print. i have to use dev c++ and the modulus ( % ) operator and if statements.
    i am new to C and also to the opperation of this site some pointers would help.

    please help someone tnkx Glenn

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    begin program
    read in int1
    read in int2
    if the greater of the two modulus the smaller one is zero,
    then print both
    else do nothing
    end program


    It's your task to put this into code. Your teacher or book
    should have given you a bunch of pointers.


    This site does homework assignments, IF you show you
    did some work in advance. Just posting your assignment
    and waiting for help will not work. Show some code or
    pseudocode like above and tell us where you have problems.
    We are here to help you learn C/C++. Not to do your
    homework. Start your assignment now and come back
    with the errors or problems you have. Post your code
    when you have some.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

Popular pages Recent additions subscribe to a feed

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