Thread: Just a simple code

  1. #1
    Registered User
    Join Date
    Nov 2016
    Posts
    1

    Question Just a simple code

    Hello everyone.

    I am really new in C programming, so sorry for my stupid questions
    I wrote a code with this result:

    http://www0.xup.in/tn/2016_11/20615726.png

    I wrote it static with a few simple printf statements.
    But there must be an easier way with a loop. Anyone has an idea?

    Thanks for helping,

    your Sunny

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Well posting your code in between [code][/code] tags will be a lot more informative than a picture of your results.
    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.

  3. #3
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    Quote Originally Posted by Sunny81 View Post
    But there must be an easier way with a loop. Anyone has an idea?
    As you said, use loops. Read up on loops in your learning material, or find a tutorial, and give it a try.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Some Simple Code
    By YoelWarda in forum C++ Programming
    Replies: 6
    Last Post: 02-21-2010, 01:49 PM
  2. help with this simple code.
    By onedestinyj in forum C Programming
    Replies: 2
    Last Post: 10-23-2009, 05:11 PM
  3. Need help with simple code. Very new to C++
    By PersianStyle in forum C++ Programming
    Replies: 20
    Last Post: 07-13-2009, 02:21 PM
  4. Help with simple code
    By shin in forum C++ Programming
    Replies: 3
    Last Post: 10-14-2005, 05:02 PM

Tags for this Thread