# C Programming – HackerRank Solution | Indian Sports Academy |

### (HackerRank) Write a Modular C Programming code to solve Indian Sports Academy, Indian Sports Academy conducting selection trials for young candidates who are willing to participate in Olympics 2022.

Indian Sports Academy conducting selection trials for young candidates who are willing to participate in Olympics 2022. Any candidate between the age group 18 to 35 can participate in the selection process. Indian Sports Academy shortlists based on the height of candidates to be selected for next rounds and only one candidate is selected from each round. Candidates are allowed to enter on a first come first serve basis, but only the candidates with a height greater than 185 centimeters will be selected for next round. Given the heights of candidates determine how may candidates are not selected for Olympics 2022.

Input Format

First Line indicates number of candidates N.

Second Line indicates height of candidates. (integer values seperated by a space)

Constraints

0 < N <= 100

Height of candidates is integer values.

Output Format

Number of candidates not selected for Olympics 2022.

Sample Input 0

7
213 200 160 225 185 195 175

Sample Output 0

3

Sample Input 1

2
210 190

Sample Output 1

0

CODE:

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>

struct node{
int height;
};
typedef struct node *NODE;
int main() {
int n;
scanf("%d",&n);
if(n<0 && n>=100)
exit(0);
{
}
else{
{
}
}
}
{
int count=0;
while(cur!=NULL)
{
free(cur);
}
else{
free(cur);
}
count++;
}
else{
prev=cur;
}
}
printf("%d",count);
}

OUTPUT

Congratulations, you passed the sample test case.

Click the Submit Code button to run your code against all the test cases.

Input (stdin)

7
213 200 160 225 185 195 175

3
Expected Output

3

Please find some more codes of Loops, Condition Statements, 1D Arrays, 2D Arrays, Strings, Pointers, Data Structures, Files, Linked lists, Stacks, Queues, Binary Trees, MISC, Solved model question papers & Hacker Rank all solutions on the below page:

Top 100+ C Programming codes – KLE Technological University