Обсуждения
where's the error ?
-3 голосов
2 ответовclass and object
1 голос
1 ответWhy is not working
0 голосов
3 ответовWhye error???
0 голосов
1 ответcan 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 голосов
3 ответовusing 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 голосов
3 ответовI am confused on this
0 голосов
1 ответjava learning
0 голосов
1 ответWhy not working
-4 голосов
4 ответовАктуальное сегодня
Hi help me I am new
1 Votes
How do I solve all test cases for popsicles problem?https://www.sololearn.com/coach/3?ref=app
0 Votes
practising daily
1 Votes
Where can I learn c#
0 Votes
Question to sololearn
1 Votes
Deep learning
0 Votes
What should i do
0 Votes