-
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
New Salesforce CDP Innovations For Smarter Customer Interactions
Salesforce CDP is also known as Salesforce Customer Data Platform helps organizations with improved personalized customer communication strategies. Yesterday Salesforce launched new CDP innovations to…
Wrapper Class in Apex Salesforce | The Developer Guide
Wrapper Class in Apex Salesforce Wrapper Class in Apex Salesforce: A wrapper or compartment radiance is a class, a realities shape, or a unique data…
5 Productivity Tips by Salesforce System Administrators
Salesforce is a highly transformative platform when used correctly. It has all the tools you need to build and optimize processes. But achieving productivity on…
Popular Salesforce Videos
Salesforce Consultant or Salesforce Admin First? | Which is Better?
In this video, Kaelan Moss - Minute Admin briefs us on whether it's better to be a Salesforce admin or consultant first. Watch the video…
3 Must-Have Validation Rules in Salesforce to Save Time and Avoid Costly Mistakes
Validation rules in Salesforce act like quality checks for your data. They help make sure that the data in your Salesforce org is accurate and…
The Future of Salesforce Security and Authentication
Learn how to enable the best security in a way that will have your users thanking you. Be the first to learn about the next-gen…
