Posts by Kelven Rodrigues • 63 points
5 posts
-
0
votes1
answer44
viewsQ: Provenance of calculation
I cannot understand why you are giving 0.00 for the calculation, and if I change the order of the calculation of the expected value, the calculation has only division and multiplication. import…
-
-1
votes1
answer198
viewsQ: Calculate difference between two schedules
I’m having second thoughts about the logic of this code: import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int horaInicial =…
javaasked Kelven Rodrigues 63 -
0
votes1
answer92
viewsQ: I need to initialize the variable with the value 0, why?
import java.util.Scanner; public class Main { public static void main(String[] args) { int codigo, quantidade; double preco; Scanner sc = new Scanner(System.in); codigo = sc.nextInt(); quantidade =…
-
0
votes1
answer434
viewsQ: Use the values of a variable array of a procedure in the main algorithm routine
program nome_jogadores_futebol_basquete_volei; {$APPTYPE CONSOLE} uses SysUtils; procedure futebol; var i: integer; jogador: array[1..11] of string; begin for i := 1 to 11 do begin writeln('Digite o…
-
4
votes1
answer216
viewsQ: Problem with the sum of 10 numbers with for
I have a doubt in an algorithm that sums 10 numbers with the repetition command for. soma_numero := soma_numero + idade; When I declare the soma_numero as 0 before the for the algorithm runs…