2
Hello, could someone tell me why the program is not finding the array I
(I will signal in the code below :
Error:
error: cannot find Symbol R+= I[P0]; Symbol: variable I Location: class matematica 1 error
class Matematica {
public static void main (String args[]) {
Scanner ler = new Scanner(System.in);
int T = ler.nextInt();
for(int SN=0 ; SN < T ; SN++){
int N = ler.nextInt();
int I[]=new int [N];
I[SN]=ler.nextInt();
}
int Q = ler.nextInt();
for(int SQ=0 ; SQ < Q ; SQ++) {
int P [] = new int[2];
P[0] = ler.nextInt();
P[1] = ler.nextInt();
while(P[0] <= P[1]) {
int P0=P[0];
int R = 0;
R+= I[P0]; // O erro está nessa linha
if(P[0] == P[1])
System.out.printf("%d",R);
P[0]++;
}
}
}
Like
não está achando
? Is there an error occurring?– Jéf Bueno
error: cannot find Symbol R+= I[P0]; Symbol: variable I Location: class matematica 1 error
– Vinicius Clemente