stop printf

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kaiyam
    New Member
    • Apr 2022
    • 1

    stop printf

    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?
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    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++ ? )

    Comment

    Working...