-
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
What are the Common Challenges in the Salesforce Classic to Lightning Migration Process?
Salesforce delivers almost everything a business requires to manage its operations efficiently. It is a comprehensive Customer Relationship Management (CRM) platform that facilitates top-level management…
Leverage Salesforce Integration Services to Retain Valuable Customers
We all have heard that integrating Salesforce with other applications provides organizations much greater operational visibility and access to unknown resources. It offers innovative products…
Migrating from Salesforce Classic to Lightning – Easy Guide
Migrating from Salesforce Classic to Lightning is essential for businesses looking to improve efficiency and stay competitive. 360 Degree Cloud’s Managed Salesforce Services make this…
Popular Salesforce Videos
Salesforce on Salesforce: How Salesforce Uses Trailhead to Drive Enablement
With Trailhead, Salesforce is transforming the learning experience for our employees at every step of their career journey. Join us to learn tips, tricks and…
Driving Gamified Interactions on Salesforce Communities With ScoreNotch | Use-Cases
A Salesforce native and lightning-ready product that makes gamification more dynamic and engaging. It encompasses powerful features that boost community engagement and ROI. Do let…
How to Set Up Salesforce Essentials
Watch through to the end for a quick link to our Hands-on Workshops and Training. Watch this video for step-by-step instructions on how to get…
