Numerical Ability
1.
If the perimeter of a rectangle is 164 cm. and its diagonal is 58 cm. long, what is the area of the
rectangle?
1608 〖cm〗^2
1608 〖cm〗^2
1806 〖cm〗^2
1860 〖cm〗^2
2.
Consider the following pie chart and table. What is the population of village D, if the
population of illiterates in village C in 2019 is 11250.
Figure1 Proportion of the population of 5 villages in 20 19
25000
22000
15000
23000
3.
If mean of a distribution is 10 and the standard deviation is 4, what is the value of
the coefficient of variation ?
40%
10%
6%
. 14%
Reasoning Ability
Verbal Ability
Technical Mcq's
Programming
C++ CODE:
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--)
{ int a[3];
for(int i=0; i<3 ; i++ ){
cin>>a[i];}
sort (a,a+3);
cout<<a[1]<<endl;
}
return 0;
}
C++ CODE:
using namespace std;
#define ll long long
ll h[100001];
int main()
{
ll n,k;
cin>>n>>k;
ll a[n];
for(ll i=0;i<n;i++)
{
cin>>a[i];
h[a[i]%k]++;
}
ll sum=0;
for(ll i=0;i<100001;i++)
{
sum+= (h[i]*(h[i]-1));
}
cout<<sum<<endl;
}
Post a Comment