-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshoot.cpp
More file actions
39 lines (37 loc) · 1.24 KB
/
Copy pathshoot.cpp
File metadata and controls
39 lines (37 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby,
C#, OCaml, VB, Perl, Swift, Prolog, Javascript, Pascal, COBOL, HTML, CSS, JS
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <iostream>
using namespace std;
int main()
{
int N, A, T ,n ,a[50];
cout<<"Enter the number of Test Case"<<endl;
cin>>T;
for(int i=0;i<T;i++){
int cnt=0;
cout<<"Enter the number of People between A and B"<<endl;
cin>>N;
cout<<"Enter the Height of A and B"<<endl;
cin>>A;
cout<<"Enter the Height of People between A and B"<<endl;
for(int j=0;j<N;j++)
cin>>a[j];
for(int j=0;j<N;j++)
{
if(a[j]>A)
cnt++;
}
cout<<"The number of people who needed to be shot down is : "<<cnt<<endl;
cout<<"Press 1 to Continue \n Press Any-Key to stop"<<endl;
cin>>n;
if(n==1)
continue;
else
exit(0);
}
return 0;
}