Thread: help with programming assignment

  1. #1
    Registered User
    Join Date
    Feb 2019

    Post help with programming assignment

    so i was given an assignment at uni, where i am required to write a program using for/while/do-while that reads 3 integer values: x,y and z.
    the task is to move from x to y with z step and print the current value in a new line(including
    the starting step but excluding the output step). z will always be a positive number

    Example 1:
    x = 3; y=14; z = 2;
    output shall be:

    can anybody help with it please, because I have no idea how to do this

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Don't you have any text books at all?

    Have you NEVER seen an example of any of those loops?

    What about printf and scanf?
    Surely you can manage to read in the required x,y,z into suitable variables.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Programming Assignment?
    By CodingNewb in forum C Programming
    Replies: 3
    Last Post: 11-28-2009, 10:02 PM
  2. Replies: 3
    Last Post: 04-26-2009, 08:54 AM
  3. Help with programming assignment
    By saszew in forum C Programming
    Replies: 3
    Last Post: 10-11-2008, 05:28 PM
  4. Help with Programming Assignment
    By JHaney in forum C++ Programming
    Replies: 18
    Last Post: 11-08-2005, 03:45 AM
  5. Programming assignment help!
    By GrlNewB in forum C++ Programming
    Replies: 4
    Last Post: 03-13-2003, 09:13 PM

Tags for this Thread