Q&A Discussões
where's the error ?
-3 Votos
2 Respostasclass and object
1 Voto
1 RespostaWhy is not working
0 Voto
3 RespostasWhye error???
0 Voto
1 Respostacan someone please explain why this code keeps telling me complication error instead of outputting the value of speed.
#include <iostream>
using namespace std;
class myClass {
public:
void setcarspeed (int a){
speed=a;
}
int getcarspeed(){
return speed;
}
private:
int speed;
};
int main() {
myClass obj;
obj.setcarspeed (40);
cout<<obj.getcarspeed ;
return 0;
}
2 Votos
3 Respostasusing System;
namespace GoodProgrammerTest
{
class Program
{
static void Main(string[] args)
{
Console.Write("Enter Yes or No");
Console.Write(
"Do you programme every day? : ") ;
int answer = Console.ReadLine();
if (answer =="Yes")
{
Console.WriteLine(
"You will be a good programmer");
}
else
{
Console.WriteLine(
"You will not be a good programmer");
}
}
}
}
2 Votos
3 RespostasI am confused on this
0 Voto
1 Respostajava learning
0 Voto
1 RespostaWhy not working
-4 Votos
4 RespostasQuente hoje
Losing hearts
1 Votes
Someone explain it... Plz!!!
1 Votes
Question ❓
0 Votes
Programming
0 Votes
Running of python or js script (backend) and entering of html page by clicking SUBMIT button
2 Votes
Web development
0 Votes
Criar aplicativo
0 Votes