<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ahmad Ruslandia Papua</title>
    <description>The latest articles on DEV Community by Ahmad Ruslandia Papua (@ahmadruslandia).</description>
    <link>https://dev.to/ahmadruslandia</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1268575%2Fb84eccf8-d7d8-4e93-a7b4-4c922d014a0a.jpg</url>
      <title>DEV Community: Ahmad Ruslandia Papua</title>
      <link>https://dev.to/ahmadruslandia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ahmadruslandia"/>
    <language>en</language>
    <item>
      <title>What is Looping?</title>
      <dc:creator>Ahmad Ruslandia Papua</dc:creator>
      <pubDate>Mon, 29 Jan 2024 13:02:09 +0000</pubDate>
      <link>https://dev.to/ahmadruslandia/what-is-looping-43gp</link>
      <guid>https://dev.to/ahmadruslandia/what-is-looping-43gp</guid>
      <description>&lt;p&gt;Looping is a command that executes code repeatedly. Looping itself is divided into 2 types, namely Counted Loops and Uncounted Loops.&lt;/p&gt;

&lt;h3&gt;
  
  
  COUNTED LOOP
&lt;/h3&gt;

&lt;p&gt;Counted Loop is a repetition where it is clearly known how many repetitions there are.&lt;/p&gt;

&lt;p&gt;The repetition referred to as a counted loop is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For&lt;/strong&gt;&lt;br&gt;
Example For Looping in C++ Language:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;iostream&amp;gt;

using namespace std;

int main() {

  for (int i = 0; i &amp;lt; 10; i++) {
    cout &amp;lt;&amp;lt; "Perulangan For - " &amp;lt;&amp;lt; i &amp;lt;&amp;lt; endl;
  }

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;actually it could also be included&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;While&lt;/strong&gt;&lt;br&gt;
Example While Looping in C++ Language:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;iostream&amp;gt;

using namespace std;

int main(){

int i = 0;

  while(i &amp;lt; 10){
    cout &amp;lt;&amp;lt; "Perulangan While - " &amp;lt;&amp;lt; i &amp;lt;&amp;lt; endl;
    i++;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Do While&lt;/strong&gt;&lt;br&gt;
Example Do While Looping in C++ Language:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;iostream&amp;gt;

using namespace std;

int main() {

int i = 0;

  do {
    cout &amp;lt;&amp;lt; "Perulangan Do While – " &amp;lt;&amp;lt; i &amp;lt;&amp;lt; endl;
    i++;
  } while (i &amp;lt; 10);
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  UNCOUNTED LOOP
&lt;/h3&gt;

&lt;p&gt;An Uncounted Loop is a repetition where it is not clear how many times it will repeat.&lt;/p&gt;

&lt;p&gt;The repetition referred to as an uncounted loop is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;While&lt;/strong&gt;&lt;br&gt;
Example While Looping in C++ Language:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;iostream&amp;gt;

using namespace std;

int main(){

char ulang = 'y';
int i = 0;

  while(ulang == 'y'){
    cout &amp;lt;&amp;lt; "\nMasukkan huruf y untuk contoh perulangan\n" &amp;lt;&amp;lt; endl;
    cout &amp;lt;&amp;lt; "Masukkan huruf : ";
    cin &amp;gt;&amp;gt; ulang;
    i++;
  }
  cout &amp;lt;&amp;lt; "\nSelesai" &amp;lt;&amp;lt; endl;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Do While&lt;/strong&gt;&lt;br&gt;
Example Do While Looping in C++ Language:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;iostream&amp;gt;

using namespace std;

int main(){

char ulang = 'y';
int i = 0;

  do {
    cout &amp;lt;&amp;lt; "\nMasukkan huruf y untuk contoh perulangan\n" &amp;lt;&amp;lt; endl;
    cout &amp;lt;&amp;lt; "Masukkan huruf : ";
    cin &amp;gt;&amp;gt; ulang;
    i++;
  } while(ulang == 'y');
  cout &amp;lt;&amp;lt; "\nSelesai" &amp;lt;&amp;lt; endl;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
  </channel>
</rss>
