So i need to use scanf() to get input of positive ints from the user and then print the number out and then ask again and keep doing this till the user enters a negative number. with what i have it prompts the user to enter a number then prints the number but it doesnt keep asking them and when i try my while loop it just give my some binary error??? If anyone could help me that would be great.

Read and discard the newline you enter in addition to the number text.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.