-1

I was learning flowcharts, wanted to show this code in a flowchart, wanted to print infinite times without declaring a counter. please note I haven't declared any counter.

for (;;){
        System.out.println("helloworld"); 
    }       }
Vyom Yadav
  • 145
  • 13
  • Seems like you have achieved what you wanted. What is your question? – Giorgi Tsiklauri Oct 12 '20 at 06:32
  • how to represent this in a flowchart, don't downvote if you cant understand – Vyom Yadav Oct 12 '20 at 06:36
  • there are certain rules for making a flowchart, like shape of boxes, etc. – Vyom Yadav Oct 12 '20 at 06:39
  • u can use raptor tool to draw a flowchart – Vyom Yadav Oct 12 '20 at 06:40
  • 1
    Please have a look at [how to ask a question](https://stackoverflow.com/help/how-to-ask) on Stack Overflow. Try to research your question, then try some approach(es), then come and ask *specific* question, with a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). Try to avoid posting unresearched and broad questions that show none of your attempts at all. Flow Charts can be implemented in a number of ways, and every answer may differ from based on opinions. – Giorgi Tsiklauri Oct 12 '20 at 06:43
  • I have read that, certain rules are there to make a flow chart, usually in a flow chart containing a loop uses a counter, but in code, you can implement it without using a counter so I was asking about a way to do the same in the flowchart – Vyom Yadav Oct 12 '20 at 06:46
  • 3
    Just make an arrow that goes back to where you need it to, without a conditional box. – Federico klez Culloca Oct 12 '20 at 07:05

1 Answers1

2

An infinite loop is like any other loop an arrow that goes back to a previous point.

Usually, you still place a condition (rhombus/diamond shape) at the start of the loop as usual, but there is only one outgoing path.

Hulk
  • 6,399
  • 1
  • 30
  • 52