can you help solve the problem? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 3

can you help solve the problem?

The height of each of the 22 students in the class is represented as an array. Determine the number of students whose height does not exceed the value of r

12th Apr 2022, 7:11 AM
Райхона Воситова
Райхона Воситова - avatar
16 Answers
+ 4
No, we don't do your homework for free.
12th Apr 2022, 7:43 AM
Lisa
Lisa - avatar
+ 3
Райхона Воситова В чем именно проблема? Задача предельно ясная: В классе 22 ученика, есть массив с данными роста каждого ученика. Нужно из этого массива вычислить количество учеников, рост которых не превышает число r. Не стесняйтесь своего кода, покажите свою попытку и мы дальше будем подсказывать. Тут уже успели показать с чего начать писать код. Удачи!
13th Apr 2022, 11:19 PM
Ilyas Bakirov
Ilyas Bakirov - avatar
+ 2
Райхона Воситова Just repeating steps : * Declare array of size 22 : int arr[22] ; * You can directly assign values here or take input into array. * Take counter variable int count=0; * by using a loop, check each array value with r, if value not exceeds, increment counter * print count value.. Done
12th Apr 2022, 9:36 AM
Jayakrishna 🇮🇳
+ 2
Algorithm,: 1 Add all the elements to an array. 2 Use a sorting algorithm to process the values like insertion sort.
13th Apr 2022, 12:33 AM
Sanjay Kamath
Sanjay Kamath - avatar
+ 2
Райхона Воситова Нет, он не вам. Он же про дочку писал, которая No написала
14th Apr 2022, 5:58 AM
Ilyas Bakirov
Ilyas Bakirov - avatar
+ 1
Спасибо помощь не нужна ) дочка видимо тыкала сидела пока я отошёл от телефона )
14th Apr 2022, 4:04 AM
Denis
Denis - avatar
+ 1
Denis Умная дочка 🙂👍
14th Apr 2022, 4:18 AM
Ilyas Bakirov
Ilyas Bakirov - avatar
+ 1
Ilyas Bakirov понятно
14th Apr 2022, 6:00 AM
Райхона Воситова
Райхона Воситова - avatar
+ 1
Спасибо, что откликнулись 😉
14th Apr 2022, 6:41 AM
Denis
Denis - avatar
0
Your code ?
12th Apr 2022, 7:40 AM
Vicent Roxan
Vicent Roxan - avatar
0
Loop through the array and increase the counter variable if the height is smaller or equal to r. Link your code if you need help
12th Apr 2022, 7:41 AM
Lisa
Lisa - avatar
0
I told you how to approach the task, read my reply carefully. Show use your code attempt so we can help you. If you can't come up with an own attempt, revise the basics before you do the task: https://www.sololearn.com/Course/CPlusPlus/?ref=app
12th Apr 2022, 8:03 AM
Lisa
Lisa - avatar
0
No
13th Apr 2022, 7:12 PM
Denis
Denis - avatar
0
Denis вы щас обо мне?
14th Apr 2022, 4:56 AM
Райхона Воситова
Райхона Воситова - avatar
- 1
this is not homework i didn't understand the task
12th Apr 2022, 7:48 AM
Райхона Воситова
Райхона Воситова - avatar
- 4
yes please write the code
12th Apr 2022, 7:43 AM
Райхона Воситова
Райхона Воситова - avatar