Posts by Ronaldd • 36 points
5 posts
-
0
votes1
answer106
viewsA: how do I make an Nxn matrix, where N is a variable (acquired in input), in python. Because the example below cannot change the values in the indices?
If you really want to use lists, you can create two nested loops to add sublists inside another list and zeros inside sublists. N = input("Digite o valor de N: ") N = int(N) mat = [] for i in…
-
1
votes2
answers148
viewsA: function using char and vector in c
First, the variable of grupo must be a vector to be able to use the bracket operator []. It must also be an array of integer values. Second, if you want to pass the vector a as a function parameter…
-
0
votes3
answers428
viewsA: Ctrl-Click Sublime Text on VS Code
In the current version of Vscode (1.33.1) you can handle Alt + (Clique duplo) in texts to select them.
-
0
votes3
answers89
viewsA: How to make the first letters that the user type uppercase?
You can use the function toupper() which takes an integer value corresponding to the ASCII value of a character and returns the ASCII integer value of the uppercase version of that character, if…
-
1
votes2
answers1808
viewsA: I cannot declare variables as a string in my C++ code
You need to specify the namespace that encompasses the class string, in that case the namespace is std. To define an object of type string you need to use the type std::string. If you need to use…