Posts by Fernando Braghiroli • 126 points
6 posts
-
1
votes3
answers68
viewsA: Passage by reference in C
Notice, friend, that you are not calling the function: you are making a syntax error, and I’m sure you must have done it by mistake. Your code should be like this: #include <stdio.h> float…
-
1
votes2
answers102
viewsA: Helps to understand the Rest of Division
Look, think about it this way: mathematically, when one number is divisible by another, the rest of the division is 0. For example: 10/2 = 5 , and rest = 0. Now, 11/2 = 5 and rest = 1. If the number…
-
0
votes3
answers105
viewsA: How to access item in Arraylist
Come on: First, create some getters for your code: public int getQuantidade(){ return this.quantidade; } public double getPreco{ return this.preco; } With that, we can return the price and quantity…
-
1
votes1
answer65
viewsA: How do I display the names and notes of an array in java?
Buddy, note that in your code, after you add a student, you ask for the grades, right? Well, for the first case, it works. However, when entering the second student, as you are using the same…
javaanswered Fernando Braghiroli 126 -
0
votes2
answers42
viewsA: Why not print the contact variable[0]->a?
I believe that you are having some difficulty understanding the initialization of the pointer to the struct. This is normal, come on: In doing struct agenda_x *contato[2] You are creating an array…
-
8
votes2
answers332
viewsQ: How does the computer "know" the alphabetical order when comparing two chars?
I have a question about Caesar’s cipher program: #include<iostream> #include<string.h> using namespace std; int main() { cout<<"Enter the message:\n"; char msg[100];…