-
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
5 Things You Must Know About Salesforce Desk.com
No matter what business you are in, no matter what domain you work on, no matter how big or small scale you operate on, the…
Salesforce Public Cloud for Education
Digitalization has transformed the way we live and has made data effortlessly accessible in a world that is always on the go, and it has…
The Benefits of Hiring a Salesforce Nonprofit Consultant for Your Organization
Nonprofits are often challenged to manually administer donor details, program data, and other critical information due to a lack of resources, time, and funding. This…
Popular Salesforce Videos
Summer Internship | Career with Salesforce
This Summer, dive into the ocean of Salesforce with S2 Labs Apply for the much-awaited S2 Labs Summer Internship Program and start accelerating your career…
Apex Triggers in Salesforce | Concepts and Examples
Apex triggers enable you to perform custom actions before or after changes to Salesforce records, such as insertions, updates, or deletions. A trigger is Apex…
Develop a Basic Slack App For Salesforce
Build Slack Apps integrated with Salesforce. Use Heroku to host Slack apps built using Slack Bolt Framework and get connected to Salesforce using Node.js library…
