A community for students.
Here's the question you clicked on:
 0 viewing
timtimi
 2 years ago
I have a problem in c++ :
i should read a vector from the keyboard for example v=(2,4,8,25,3,66) and after this i should display another vector that contains the numbers 4 and 25 because 4=2*2 and 25=5*5 .
timtimi
 2 years ago
I have a problem in c++ : i should read a vector from the keyboard for example v=(2,4,8,25,3,66) and after this i should display another vector that contains the numbers 4 and 25 because 4=2*2 and 25=5*5 .

This Question is Closed

Shadowys
 2 years ago
Best ResponseYou've already chosen the best response.1i.e. you want to use the cin to get input and a function that tests if the number is a square of another number?

Shadowys
 2 years ago
Best ResponseYou've already chosen the best response.1this is an example for an array. #include <iostream> using namespace std; int main() { int list[]={6,7,8,9}; int i,j; for (i=0;i<4;i++) { for (j=0;j<list[i];j++) { if (j*j==list[i]) { cout<<list[i]<<">"<<j<<"F\n"; } } } }
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.