This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Software Teaming: A Mob Programming, Whole-Team Approach and have Woody Zuill and Kevin Meadows on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

I want C program that receives numbers until the user input (-1), then print reverse all of numbers

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Bartender
Posts: 653
14
TypeScript Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have a question or what
 
Marshal
Posts: 77139
370
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

I think you have misunderstood the quesstion. You are supposed to enter numbers and stop when −1 is entered. You want a loop for the input with ... while (input != -1) ... in. You need a separate function for reversing the digits in the number.
Warning: 567890 will reverse to 98765, and if you reverse that again you will get 56789, not the original number.
 
Alireza Saidi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Al Hobbs wrote:Do you have a question or what


Hell0! I need help to solve it please.
 
Alireza Saidi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello dear friend! How can I solve that? Can you help me please?
 
Campbell Ritchie
Marshal
Posts: 77139
370
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please don't quote the whole of a preceding post; that adds nothing new and is liable to removal without notice.
Start by writing a program that takes entry of a number and simply prints, “You entered 123456.” When that is working correctly, you can enhance it by adding more functionality.
 
Rancher
Posts: 473
15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Alireza - please can you copy/paste the actual question just so we know exactly what it is you are trying to do?
 
lowercase baba
Posts: 13086
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Alireza Saidi wrote:Hello dear friend! How can I solve that? Can you help me please?


People here love to help you, but they won't do it for you.  You need to tell us what exactly the problem is.  Does this compile? does it run?  does it give the wrong output?

tell us the details.  Ask questions.  engage with people who post, and you will get more help than you could ever ask for.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic