<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Persistent Bugger Archives - Onestring Lab</title>
	<atom:link href="https://onestringlab.com/tag/persistent-bugger/feed/" rel="self" type="application/rss+xml" />
	<link>https://onestringlab.com/tag/persistent-bugger/</link>
	<description>Kode Kreativitas Kopi</description>
	<lastBuildDate>Mon, 04 May 2026 08:38:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://onestringlab.com/wp-content/uploads/2021/10/cropped-osl-high-res-e1455499003866-32x32.jpg</url>
	<title>Persistent Bugger Archives - Onestring Lab</title>
	<link>https://onestringlab.com/tag/persistent-bugger/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Belajar Bahasa C &#8211; Persistent Bugger</title>
		<link>https://onestringlab.com/persistent-bugger/</link>
		
		<dc:creator><![CDATA[Rajo Intan]]></dc:creator>
		<pubDate>Fri, 02 Dec 2022 04:28:00 +0000</pubDate>
				<category><![CDATA[Codewars]]></category>
		<category><![CDATA[C Language]]></category>
		<category><![CDATA[Persistent Bugger]]></category>
		<guid isPermaLink="false">https://onestringlab.com/?p=785</guid>

					<description><![CDATA[<p>Write a function,&#160;persistence, that takes in a positive parameter&#160;num&#160;and returns its multiplicative persistence, which is the number of times you must multiply the digits in&#160;num&#160;until &#8230; </p>
<p>The post <a href="https://onestringlab.com/persistent-bugger/">Belajar Bahasa C &#8211; Persistent Bugger</a> appeared first on <a href="https://onestringlab.com">Onestring Lab</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Write a function,&nbsp;<code>persistence</code>, that takes in a positive parameter&nbsp;<code>num</code>&nbsp;and returns its multiplicative persistence, which is the number of times you must multiply the digits in&nbsp;<code>num</code>&nbsp;until you reach a single digit.</p>



<p>For example&nbsp;<strong>(Input &#8211;&gt; Output)</strong>:</p>



<pre class="wp-block-code"><code class="">39 --&gt; 3 (because 3*9 = 27, 2*7 = 14, 1*4 = 4 and 4 has only one digit)
999 --&gt; 4 (because 9*9*9 = 729, 7*2*9 = 126, 1*2*6 = 12, and finally 1*2 = 2)
4 --&gt; 0 (because 4 is already a one-digit number)</code></pre>



<p>The problem link is <a href="https://bit.ly/3gLAShQ">here</a>.</p>



<p><strong>Solution:</strong></p>



<pre class="wp-block-code"><code lang="csharp" class="language-csharp line-numbers">int persistence(int n)
{
  int x = 0;
  while (n &gt; 9)
  {
    int m = 1;
    while (n)
    {
      m = m * (n % 10);
      n = n / 10;
    }
    n = m;
    x++;
  }
  return x;
}</code></pre>
<p>The post <a href="https://onestringlab.com/persistent-bugger/">Belajar Bahasa C &#8211; Persistent Bugger</a> appeared first on <a href="https://onestringlab.com">Onestring Lab</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
