-
Error in printing series 1, (1+1)^2= 4, (4+1)^2 =25 upto 10 terms.
Error in printing series 1 , (1+1)^2= 4 , (4+1)^2 =25 upto 10 terms.
Code:integer i , n1=1 , n2=1 , n3=2 , n4=1 , count=10;
for(i=0;i<count;i++)
{
n4 = (n1+n2)*(n1+n2);
System.debug(n1 + ', (' + n1 + '+' + n2 + ')^' + n3 + '=' + n4 + ' , ');
n1=n4;
}Screenshot:

debug in different lines not in a single line . How to debug in a single line like a whole series?
Log In to reply.
Popular Salesforce Blogs
Driving Innovation With Ideas From Your Online Community | Salesforce Guide
Innovation is the key to business growth. In order to come up with a successful product, you need to make the most of ideas and…
Introduction to Salesforce Communities: Licenses and Benefits
What are Salesforce Communities? Salesforce is a San Francisco based organization that gives client connection to the board (CRM) programming arrangements. Most importantly, Salesforce people…
Salesforce Trailhead and Certification Leader Board - ForceLeaderBoard (Unofficial)
Force Leader Board - Salesforce Trailhead and Certification Leader Board Here it comes ... It's time to show your trailhead badges and certifications in on place.…
Popular Salesforce Videos
Discover Lightning Web Components | Salesforce Tutorial
Watch this Salesforce tutorial. After completing this unit, you’ll be able to: Explain the Lightning Web Components programming model. List the benefits of using Lightning…
What is Salesforce Labs?
Free. Open Source. Solutions by Salesforce Employees. From bots to dashboard packs and beyond, Salesforce Labs has something to fit all your business needs. Watch…
Spring'21 Prior Value in Salesforce Record Triggered Flows - ISCHANGED IN Salesforce Flows
In this video, I'm talking about the Prior value feature in the Spring'21 pre-release that is for the record triggered flow. Pre-Release Org URL: https://www.salesforce.com/form/signup/prerelease-spring21/…
