Q&A Discussões
Find the bug...
3 Votos
1 RespostaJOptionPane
-3 Votos
1 Respostawhy does this code output that there is an error because the else statement doesn't have a corresponding if statement?. How do i correct this?
#include <iostream>
using namespace std;
int main() {
int a;
for (int x =0; x<5;x++){
cin>>a;
if (a<1){
cout<<"a cannot be less than 1\n";
}
else if (a>10){
cout <<"a cannot be greater than 10\n";
}
}
else{
cout<<"code can run now"<<endl;
}
return 0;
}
3 Votos
8 RespostasArreglos
0 Voto
4 RespostasHow to use cerr in c++ ?
2 Votos
2 Respostasgetting error when try to use this code
System.out.printf("my name is %s","Roy");
it's showing like: exception in thread"main" Java.lang.Error: unresolved compilation problem:
the method printf(String,Object[ ]) in the type printstream is not applicable for the arguments (String,int)at tutorial 19.App.main(App.java:11)
0 Voto
3 RespostasQuente hoje
Kernel in Jupyter
2 Votes
SQL
2 Votes
JAVA PROGRAMMING
1 Votes
What Does Pseudo Elements Mean.
2 Votes
IMAGE
0 Votes