Q&A Discussions
Find the bug...
3 Votes
1 AnswerJOptionPane
-3 Votes
1 AnswerShow command doesn't wirk
0 Votes
1 Answerwhy 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 Votes
8 AnswersHow to use cerr in c++ ?
2 Votes
2 Answersgetting 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 Votes
3 AnswersHot today
Kernel in Jupyter
2 Votes
SQL
2 Votes
JAVA PROGRAMMING
1 Votes
What Does Pseudo Elements Mean.
2 Votes
IMAGE
0 Votes