Computer Science, asked by kunakavya1, 3 months ago

The placement season has begun in a college. There are N number of students standing
outside an interview room in a line. It is given that a person who goes in first half has
higher chances of getting selected.
Each student has a number associated with them known as the problem solving
capability. The higher the capability, the higher the chances of selection. Now each
student wants to know the number of students ahead of him/her who have more
problem-solving capability than him/her.
A
Find the number for each student.
Input:
An integer n, which denotes the number of student present.
An array of size n, denoting the problem solving capability of the students.
Output:
An array of size denoting the required answer for each student​

Answers

Answered by rinodhabraham24
4

input1:6

input2:{49,5,3,2,10}

Answered by vinod04jangid
0

Answer:

public class Main

{

public static void main(String[] args) {

    int [] students = {4,9,5,3,2,10};

    int counter;

    for(int i=0; i<6; i++){

        counter = 0;

        for(int j=0; j<i; j++){

            if (students[j] > students[i]){

                counter += 1;

            }

        }

         System.out.print(counter+" ");

    }

}

}

Explanation:

C++ is a cross-platform language that may be used to create excessive-overall performance programs.

C++ became evolved with the aid of using Bjarne Stroustrup, as an extension to the C language.

C++ offers programmers a excessive stage of manage over device sources and memory.

The language became up to date four primary instances in 2011, 2014, 2017, and 2020 to C++11, C++14, C++17, C++20.

Why Use C++

C++ is one of the world's maximum famous programming languages.

C++ may be observed in modern day working systems, Graphical User Interfaces, and embedded systems.

C++ is an object-orientated programming language which offers a clean shape to applications and lets in code to be reused, decreasing improvement costs.

C++ is transportable and may be used to expand programs that may be tailored to a couple of platforms.

C++ is a laugh and clean to learn!

As C++ is near C# and Java, it makes it clean for programmers to interchange to C++ or vice versa.

Find the errors in these C++ statements.

https://brainly.in/question/35374665?msp_srt_exp=6

write a program in c++ that will input 10 number from the users in 1 dimensional array and then short the array in decending order using selectyion sort

https://brainly.in/question/3202991?msp_srt_exp=6

#spj3

Similar questions