0% found this document useful (0 votes)
8 views1 page

Handwritten Notes on Loops & Armstrong Number

The document explains the use of the continue statement in loops, highlighting that it skips to the next iteration. It differentiates between entry control loops (like while and for) and exit control loops (like do-while). Additionally, it provides a C program example to check for Armstrong numbers.

Uploaded by

sajaltaliyan2006
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

Handwritten Notes on Loops & Armstrong Number

The document explains the use of the continue statement in loops, highlighting that it skips to the next iteration. It differentiates between entry control loops (like while and for) and exit control loops (like do-while). Additionally, it provides a C program example to check for Armstrong numbers.

Uploaded by

sajaltaliyan2006
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Handwritten Style Notes

Q1: Use of continue statement:


→ The continue statement skips the remaining code inside a loop and moves to the next
iteration.

Q2: Entry vs Exit Control Loop:


→ Entry control: Condition checked first (e.g., while, for).
→ Exit control: Condition checked after execution (e.g., do-while).

Q3: Armstrong Number Program (C):


int num, rem, sum=0, temp;
printf("Enter a number:");
scanf("%d", #);
temp=num;
while(temp!=0){ rem=temp%10; sum+=rem*rem*rem; temp/=10; }
if(sum==num) printf("Armstrong"); else printf("Not Armstrong");

You might also like