470,574 Members | 1,115 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,574 developers. It's quick & easy.

stop printf

1
I'm writing code that calculates whether or not a triangle is valid based on measurements given by a user. When the measurements are valid, I use printf to print "triangle valid". But it prints forever until I press ctrl C. How do I make it only print once?
3 Weeks Ago #1
1 10267
zmbd
5,436 Expert Mod 4TB
Hello Kaiyam;
Please post your code -- Please use the [CODE/] button to format posted script
You have a loop somewhere and without your code it's a bit hard point you in the right direction...
(I'm also guessing that you're developing in C or C++ ? )
3 Weeks Ago #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Peter Ammon | last post: by
12 posts views Thread by John Devereux | last post: by
30 posts views Thread by siliconwafer | last post: by
20 posts views Thread by v4vijayakumar | last post: by
20 posts views Thread by Sanchit | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.