Обсуждения
Python3 for loop nested
1 голос
4 ответовNo 2nd input char after 1st input
0 голосов
4 ответов#include <iostream>
using namespace std;
class employee
int main()
{
private:
double salary;
public:
void getsalary(double sal)
{
salary=sal;
}
void display()
{
cout<<"the salary:"<<salary;
}
};
void main ()
{
employee programmer;
employee manager;
manager.getsalary (60000.0);
programmer.getsalary(40000.0);
manager.display();
programmer.display();
return 0;
}
1 голос
5 ответовI wrote a simple basic c++ code in my PC notepad and I saved it with .cpp extension also. But when I run this program in any browser it shows the code as it is... Do c++ code can be written in notepad and can be run? Please answer.
#include <iostream>
using namespace std;
int main()
❴
cout << "hello";
return0;
❵
2 голосов
10 ответовpublic class Vehicle {
int maxSpeed;
int wheels;
String color;
double fuelCapacity;
void horn() {
System.out.println("Beep!");
}
}
class MyClass {
public static void main(String[ ] args) {
Vehicle v1 = new Vehicle();
Vehicle v2 = new Vehicle();
v1.color = "red";
v2.horn();
System.out.println(v1);
}
}
Explain its outcome. I am unable to get the last line of outcome.
-1 голос
2 ответовBeginer Help
2 голосов
3 ответовPlease Helpp
1 голос
1 ответCan you kindly explain this code?
0 голосов
1 ответАктуальное сегодня
New code
1 Votes
How would you solve the part of the C# Intermediate code project that requires operator overloading?
0 Votes
Hello Everyone
0 Votes