DoNotWant's Profile
Reputation: 10
Tradesman
- Group:
- Members
- Active Posts:
- 48 (0.08 per day)
- Joined:
- 03-November 11
- Profile Views:
- 1,194
- Last Active:
4 minutes ago- Currently:
- Viewing Topic: [ MIPS ] sub-routine that divide...
Previous Fields
- Country:
- SE
- OS Preference:
- Windows
- Favorite Browser:
- FireFox
- Favorite Processor:
- Who Cares
- Favorite Gaming Platform:
- Who Cares
- Your Car:
- Who Cares
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: [ MIPS ] sub-routine that divide by 2 (exam tests)
Posted 25 May 2013
If bit 0 is set, then it is an odd number. Only even numbers are divisible by 2.
If you and a0 with 1, and store the result in v0, v0 will contain 1 when a0 is NOT divisible by 2.
You are doing it right, but it can be done with 1 instruction. -
In Topic: Stopping a console app from closing in Visual Studios?
Posted 15 May 2013
Ctrl+F5(Start without debuging) -
In Topic: How do I get my calculator to work?!
Posted 20 Apr 2013
void addition(float a, float b, float total) { cout << "Enter two integers (separated by a single space): "; cin >> a, b; total = a + b; cout << "The sum is: " << total << endl; }
If you have declared your add function like this, you have to call it like this.
addition(firstArgumentToBePassed, secondArgumentToBePassed, etc, etc...);
As you call it now, you could just change you functions.
void addition() { int a, b, total = 0; cout << "Enter two integers (separated by a single space): "; cin >> a, b; total = a + b; cout << "The sum is: " << total << endl; }
Don't write "Enter two integers", and then use floats BTW. -
In Topic: Positioning of declaring variables affects output ?
Posted 9 Apr 2013
You can declare b before, but you can't assign a to it before anything is assigned to a.
int a; int b; printf("Enter a number:"); scanf("%d",&a); b = a+1; printf("%d", B)/>/>;
It is the same for all languages I think, anything else would be strange.
Well, in C/++ you COULD, but it would be a garbage value. -
In Topic: What is a state machine?
Posted 7 Apr 2013
http://www.dreaminco...-state-manager/
This should do it for a 2D game, since it is for a 2D game. Good tutorial also.
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
-
Contact Information
- E-mail:
- Private
Friends
DoNotWant hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
simmu
27 Dec 2011 - 00:23