Write a program that take a number from user . if number is positive, then print first five alphabets of a,b,c on screen .
Write a program that take a number from user . if number is positive, then print first five alphabets of a,b,c on screen .
#include<stdio.h>
main()
{
int a;
char b;
printf("Enter a number");
scanf("%d",&a);
if(a>0)
{
printf("numer is positive");
for(b=1;b<=5;b++){
printf("\n character is %c",b);
}
}
else
{
printf("number is not positive");
}
}
#include<stdio.h>
main()
{
int a;
char b;
printf("Enter a number");
scanf("%d",&a);
if(a>0)
{
printf("numer is positive");
for(b=1;b<=5;b++){
printf("\n character is %c",b);
}
}
else
{
printf("number is not positive");
}
}
Comments
Post a Comment