Thread: help, cprograming

  1. #1
    Registered User
    Join Date
    Sep 2001

    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
    Hannover, Germany
    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.

    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