Обсуждения
"time is not defined"?
2 голосов
1 ответPublic static vs prívate static? C#
3 голосов
2 ответовConstructor Error
1 голос
2 ответовCan someone explain this code to me....
class ReverseNumberDemo
{ public static void main(String args[]) {
int num=123456789;
int reversenum =0;
while( num != 0 ) {
reversenum = reversenum * 10;
reversenum = reversenum + num%10;
num = num/10; }
System.out.println("Reverse of specified number is: "+reversenum);
}
}
the thing I don't get is the reversenum part......isn't reversenum=0 so wouldn't reversenum*10=0
0 голосов
8 ответовcan anyone plz explain me this program step by step?#include <iostream>
using namespace std;
class MyClass {
public:
int var;
MyClass() { }
MyClass(int a)
: var(a) { }
MyClass operator+(MyClass &obj) {
MyClass res;
res.var= this->var+obj.var;
return res;
}
};
int main() {
MyClass obj1(12), obj2(55);
MyClass res = obj1+obj2;
cout << res.var;
}I am not getting the part inside operator+
0 голосов
8 ответовIn dire need of tutoring or help
0 голосов
2 ответовStyling Swing Components in java
0 голосов
2 ответовwhere's the error ?
-3 голосов
2 ответовUse Controls In Class? (Winforms C#)
0 голосов
1 ответData Members and Member functions
-1 голос
1 ответObjects in heap?
0 голосов
1 ответ"id returned 1 exit status"?
1 голос
1 ответBinary search guessing game help
0 голосов
1 ответHow to use inner classes on java
0 голосов
2 ответовWhy is not working
0 голосов
3 ответовLinked list questions, part 3
0 голосов
3 ответовWrite a program to return the area of Geometricshapes square and rectangle. Area of square is side*side, rectangle is length*breadth. The controlling class should display the following menu and respond to the user’s selection
Mean
1. Calculate area of square
2. Calculate area of rectangle
3. Quit
Enter your choice (1-3):
0 голосов
3 ответовA little help with my classes program
2 голосов
1 ответАктуальное сегодня
Pig Latin
0 Votes
Someone can help me
0 Votes
Please rate my code from 1 to 10
2 Votes
Square Roots
0 Votes
What's wrong with this?
2 Votes
I’m new someone can help me
0 Votes