Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuiteDiscussions Q&R
class and object
1 Vote
1 RéponseWhy is not working
0 Vote
3 RéponsesWhye error???
0 Vote
1 Réponsecan 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 Votes
3 Réponsesusing 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 Votes
3 RéponsesI am confused on this
0 Vote
1 Réponsejava learning
0 Vote
1 RéponseWhy not working
-4 Votes
4 RéponsesAujourd'hui en vedette
Media on HTML
0 Votes
Is Sololearn better or Mimo.org?
2 Votes
How to cast in python
0 Votes
How to show img???
0 Votes
Python
0 Votes
Java project
0 Votes
Jungle capming
0 Votes
JavaScript
0 Votes
Editor HTML
0 Votes