0% found this document useful (0 votes)
12 views7 pages

Task 3 C Language

The document is a presentation on C programming language focusing on looping statements, created by Sunetra Suresh Shiraguppi during an internship at AXILE.X Group of Companies. It covers the implementation of for, while, and do-while loops with example codes and outputs. Additionally, it explains the concept of iterative statements and their execution until a specified condition is met.

Uploaded by

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

Task 3 C Language

The document is a presentation on C programming language focusing on looping statements, created by Sunetra Suresh Shiraguppi during an internship at AXILE.X Group of Companies. It covers the implementation of for, while, and do-while loops with example codes and outputs. Additionally, it explains the concept of iterative statements and their execution until a specified condition is met.

Uploaded by

useforgitonly23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Task

JAIN COLLEGE OF ENGINEERING AND TECHNOLOGY


COMPUTER SCIENCE AND ENGINEERING
3 RD YEAR
[A Presentation on]
C PROGRAMMING LANGUAGE (looping statements)
Internship carried out at
“AXILE.X GROUP OF COMPANIES”

Submitted by:
SUNETRA SURESH SHIRAGUPPI
[2JH22CS106]

Co-Founder: Team Management:


Mr. Omkar Patil Miss. Arpita Vandkudari
AXILE.X GROUP OF COMPANIES AXILE.X GROUP OF COMPANIES
Develop a simple C program using looping statement

1.

e<stdio.h> OUTPUT:
() enter the value n
3
;
“enter the value n\n”); numbers are
%d”, &n); 1
“numbers are\n”, n); 2
;i<=n ; i++) 3

tf(“%d \n”, i);


2. while Loop

#include<stdio.h>
OUTPUT:
Void man()
{
enter the value of n
int counter , n;
5
printf(“enter the value of n\n”);
First 5 natural numbers are
scanf(“%d” , &n);
1
printf(“First %d natural numbers are \n”, n); 2
counter=1;
3
while(counter<=n)
4
{
while Loop 3.

nclude<stdio.h> OUTPUT:
main()
Hiii!!!, I’m Intern @ AX
int i=1; Hiii!!! I’m Intern @ AXIL
do { Thank you
printf(“Hiii!!! , I’m Intern @ AXILE.X \n”);
i++;
}while(i<=2);
printf(“Thank you “);
return o;
4. about the looping statements….
Brief

 Iterative statements or loops refer to repitative execution of same set of instructions


for given number of times until a result is obtained.
 There are 3 looping statements
• while loop
• do- while loop
• for loop
 while loop : Its executes the statements until the condition of while loop evaluates
its true, loops get terminated when condition becomes false.
• It is also called pre-test looping.
 do-while loop : Block of statements within do is executed first then the condition
is checked ,if it is true the block execution is repeated.
• It is also called post- test looping.
 for loop: for loop consist of 3 parts such as initialization, conditional expression
& increment or decrement. The initialization statement is executed only once at the
beginning ,then the conditional expression is checked by the program,,, If conditiona
expression is false the loop is terminated, if true then blocks of statement inside bod
5. Final combination of all codes .
#include <stdio.h>
int sum=0
int main() {
for (int i = 1; i <=5; i++) {
sum += i;
}
printf("Sum using for loop: %d\n", sum);
int j = 1;
while (j <=5) {
sum += j;
j++;
}
printf("Sum using while loop: %d\n", sum);
int k = 1;
do {
sum += k;
k++;
} while (k <=5);
printf("Sum using do-while loop: %d\n", sum);
return 0;
}
After completion of the Task 3 candidate must upload it the respected google form.
th

You might also like