Advertisement
pranto_95

lab 4,task 2

Jun 4th, 2015
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. /* input 5 students age and check how many of those are teen*/
  2. #include<stdio.h>
  3. int main(){
  4.     int a,c,t;
  5.     t=0;
  6.     for(a=1;a<=5;a++){
  7.             scanf("%d",&c);
  8.             if(c>=13 && c<=19){
  9.               t=t+1;
  10.             }
  11.     }
  12.     printf("number of teen student is %d",t);
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement