Discussioni Q&A
where's the error ?
-3 Voti
2 Risposteclass and object
1 Voto
1 RispostaWhy is not working
0 Voti
3 RisposteWhye error???
0 Voti
1 Rispostacan 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 Voti
3 Risposteusing 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 Voti
3 RisposteI am confused on this
0 Voti
1 Rispostajava learning
0 Voti
1 RispostaWhy not working
-4 Voti
4 RispostePopolare oggi
Where is the bug?
3 Votes
Pointers cpp
2 Votes
Is pro worth the money ?
1 Votes
Drawing images in java
2 Votes