• Register
0 votes
37 views

Problem:

Declare a vector named scores of twenty-five elements of type int?

5 3 2
7,520 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution:

vector <int> scores(25);

6 4 2
14,580 points
"A vector, in Programming is a sort of exhibit that is one dimensional. Vectors are a consistent component in programming dialects that are utilized for putting away information. Name of vectors scores of 25 components of type int: vector &lt;int&gt; scores(25);
Integer makes a whole integer vector of the predefined length. Every component of the vector is equivalent to 0. integer vectors exist with the goal that information can be passed to C or Fortran code which anticipates them. as. whole number endeavors to constrain its contention to be of whole number sort.
"

Related questions

0 votes
1 answer 43 views
43 views
Problems: I am new in programming and my logic is not good, can anyone give the right solution? How can we declare an array named scores of twenty-five elements of type int?
asked Feb 13, 2020 maddi86 5.4k points
0 votes
2 answers 108 views
108 views
Problem: Declare and instantiate a 3x3 two-dimensional array of integers named tictactoe?
asked Apr 18, 2020 ArifulIslam 7.5k points
1 vote
2 answers 35 views
35 views
Problem: Declare a variable named myMenu suitable for holding references to Menu objects?
asked Mar 23, 2020 ArifulIslam 7.5k points
0 votes
1 answer 39 views
39 views
Problem: Declare a reference variable of type File named myFile?
asked Apr 6, 2020 ArifulIslam 7.5k points
0 votes
1 answer 135 views
135 views
Problems:- Can any one help with one of the query I am facing in declaring variable type Declare a reference variable of type File named myFile. Any Idea
asked Feb 13, 2020 maddi86 5.4k points
0 votes
1 answer 591 views
591 views
I was making a C ++ program for entertainment which includes vectors. I need to get the size of the vector. Could someone help me to get said value?
asked Aug 15, 2020 game 4.6k points
0 votes
0 answers 34 views
34 views
Problem: Which one of the following would contain the translated Java byte code for a program named Demo? A) Demo.java B) Demo.code C) Demo.class D) Demo.byte
asked Jul 23, 2020 conner 1.5k points
1 vote
1 answer 60 views
60 views
Problem: For the following code : E = [5,200]; Selected edge values X = imread('LENNA128.bmp'); N = length(X); Y = false(N+2); for k = 1:numel(E); Y(2:end-1,2:end-1) = X==E(k); Z = Y(1:end-2,2:end-1) | Y(3:end,2:end-1) | Y(2:end-1,3:end) ... )/2); end I get the error message: In an assignment A(:) = B, the number of elements in A and B must be the same Can anyone help me out to solve this problem.
asked Apr 9, 2020 LizzyM 6.1k points
0 votes
1 answer 37 views
37 views
I need to make a [console] program that gets the full names of five people, as well as their three grades to calculate their average. Instead of declaring variable by variable string nom1, nom2 //... int cal1, cal2 //... I want to make a for loop (or ... at the end because "the identifiers are not defined". Is it possible to achieve this, or is it something that not even magic can achieve?
asked Nov 8, 2020 sasha 8.4k points
0 votes
1 answer 14 views
14 views
I need to make a [console] program that gets the full names of five people, as well as their three grades to calculate their average. Instead of declaring variable by variable string nom1, nom2 // ... int cal1, cal2 // ... I want to make a for loop (or ... at the end because "the identifiers are not defined". Is it possible to achieve this, or is it something that not even magic can achieve?
asked Aug 15, 2020 game 4.6k points