-
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
Learn All About the Batch Apex in 2023
The main purpose of using Batch Apex is used to process a large amount of data without exceeding governor limits. It is a type of…
Best Practices for Salesforce Integration: Streamlining and Optimizing Your Workflow
Salesforce integration plays a crucial role in connecting your org with other systems, streamlining workflows, and enabling data-driven decision-making. To ensure successful integration, it’s essential…
Popular Salesforce Videos
Build Your First Salesforce IoT Project in 20 Minutes
Join us to see how you can build your first Salesforce IoT orchestration in less than 20 minutes! You will learn a quick overview of…
Salesforce CPQ Implementation Best Practices
Follow these Salesforce CPQ implementation best practices across various phases for optimal results: Preparation phase, Implementation phase, Customization, User adoption, and Post Implementation phase. Each…
How To Land A Salesforce Job In India
This video explained about to land a Salesforce job in India. This is a great opportunity to enter the Salesforce echo systems for non-Salesforce professionals…
