-
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

How to Import Salesforce Custom Metadata Records using CSV/JSON
Importing Salesforce Custom Metadata Records can be really tricky. Forget about using the import wizard or dataloader to do that. These tools are amazing but…

Creating Reports in Salesforce: Most Important Aspects
The time has come. Your business begins to ask questions, and the data you have collected has the answers. You need the information to help…

What Are Setup and Non-Setup Objects in Salesforce
In this top salesforce blog, we will be discussing what are Setup and Non Setup Objects in Salesforce. Setup and Non-Setup Objects in Salesforce Non-Setup…
Popular Salesforce Videos
How to Execute a SOQL Query in POSTMAN?
Watch this video to learn how to execute a SOQL Query in POSTMAN. If you have any doubts or questions, let us know in the…
TrailheaDX 2021: Salesforce's Parker Harris Explains How Low-code is Reshaping Software Development
Salesforce CTO and co-founder Parker Harris talk about TrailheaDX 2021 and how low-code is dramatically changing the process of business software development. Watch and learn.
Agile in Salesforce | Agile Salesforce Implementation
Watch this video to learn about Agile Salesforce Implementation When Salesforce met Agile Agile vs Waterfall Introduction to Scrum Scrum Roles Scrum Ceremonies Q&A