-
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
Essential Skills Every Salesforce Admin Should Have
Salesforce is rapidly gaining popularity as a strong ecosystem with its multiple offerings. Every organization that wants a strong tool or platform looks up to…
All You Need to Know About Apex Test Class in Salesforce
You may create and run tests for your apex classes and triggers on the lightning platform using the apex testing framework. Apex unit tests help…
3 Salesforce Security Vulnerabilities Companies Should Not Ignore
Gartner estimates that 99% of cloud security failures stem from customer misconfigurations. Recent cybersecurity alerts confirm this trend in enterprise customer relationship management (CRM) environments.…
Popular Salesforce Videos
Driving Sales Productivity and Motivations from Your Salesforce Data
Meet OneUp Sales, the revolutionary sales motivation platform built for modern sales teams. By leveraging data extracted from systems you already use, OneUp powers lively…
DreamTX Welcome Day 2 | Dreamforce 2020 | Salesforce
If you missed DreamTX DAY 2, then live this amazing experience here, we have covered it all for you. See the power of Customer 360,…
Control Access to the Org | Data Security | Salesforce
In this video, wonder Studies explains how to control access to your Salesforce org and the data security measures you can take to protect your…
