Write a program to check age of any student is teen age or not.
Programming in C Language...
About program-- In this program we input age of a student and check he is teen ager or not. In details , If age is greater and equal to 13 and less than and equal to 19 then we can say , student is teen ager and if this condition is false then we print that student is not teen ager.
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter age of student=");
scanf("%d",&a);
if(a>=13 && a<=19)
printf("\nThis is teen ager");
else
printf("\nThis is not teen ager");
getch();
}
OUTPUT
Enter age of student=19
This is teen ager
Or
Enter age of student=23
This is not teen ager
About program-- In this program we input age of a student and check he is teen ager or not. In details , If age is greater and equal to 13 and less than and equal to 19 then we can say , student is teen ager and if this condition is false then we print that student is not teen ager.
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter age of student=");
scanf("%d",&a);
if(a>=13 && a<=19)
printf("\nThis is teen ager");
else
printf("\nThis is not teen ager");
getch();
}
OUTPUT
Enter age of student=19
This is teen ager
Or
Enter age of student=23
This is not teen ager
- Write a program to input two digit number and check number is palindrome or not.
- Write a program to input speed of Royal Enfield and check it's running at economic speed or not.
- Write a program to input length and width of a shape and find shape is square or rectangle.
- Write a program to input sell price and cost price and find transaction is profit or loss.
Share your programmer friends
Comment and subscribe for recently updates....
Comments
Post a Comment