Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Input 5 students age and find how many of them are younger than last student*/
- #include<stdio.h>
- int main(){
- int i,x[5],c=0;
- for(i=0;i<5;i++){
- scanf("%d",&x[i]);
- }
- for(i=0;i<5;i++){
- if(x[i]<x[4]){
- c++;
- }
- }
- printf("%d",c);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement