C Program to Print Alphabets from a-z with Algorithm
Here, we just get a look into a C program to print alphabets from a-z and it’s step by step algorithm.
Aim:
Write a C program to print English alphabets from a-z.
Algorithm:
Step 1: Start the program.
Step 2: Read the value of the character variable namely le.
step 3: Set a loop counter variable from le=’a’ that continues the iteration till le=’z’, increment the loop by one in each iteration.
Step 4: Print the corresponding value of the character variable(le) within the loop.
Step 5: Stop.
C Program to Print Alphabets from a-z
#include
int main() {
char le;
printf("Alphabets from a-z are:\n");
for(le = 'a'; le <= 'z'; le++)
{
printf("%c\n", le);
}
return 0;
}
Variables and Terms used in the program:
le – Letter or character variable.
Output:
Alphabets from a-z are: a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z