381 Posted Topics
Re: Mathematically, you can just constantly substract the dividend with divisor and count it until the dividend become smaller than the divisor. If dividend become 0 after it's been constantly substracted, it means that the dividend is divisible to divisor. If dividend is bigger than 0, then it is a remainder. … | |
Re: I think you didn't provide enough information about your project. For example: how the loop produce the combination? how will you compare those combination? what is the purpose of your combination? what is the pattern of your combination? and what type of combination that need to be romoved? I suggest … | |
Re: Then use [icode]goto[/icode] [code=cplusplus] for (int a=0; a<10; a++) { for (int b=0; b<10; b++) { for (int c=0; c<10; c++) { if (b == 5) goto endloop; } } } endloop: [/code] | |
Re: You have sorted your income array and that is the reason why. | |
Re: [QUOTE=ivailosp;640170]i can't explain... but i can wright it like this: [code=cpp] int sum_numbers(int x, int y) { int sum = x; int tmp; do { tmp = y; y = (sum&y) << 1; sum ^= tmp; } while (y); return sum; } [/code] this is algorithm and i don't know … | |
Re: [QUOTE=Prabakar;646372]So many languages are used widely in industries & I have not even heard of some of those languages. My head is swinging. What is .Net? Is it a language? I have heard people say VB.Net, ASP.Net, C#.Net, etc. What do they mean[/QUOTE] Because they need .Net FrameWork I guess. | |
Re: [code=cplusplus] int ans,num,power1 ; num =1; [/code] Why you declare something that you didn't use? [code=cplusplus] number=number*number; power--; return(byThePower(number,power)); [/code] Let say that the number is 2 and the power is 4 then with this code it would process like this. [LIST] [*]2 x 2 = 4 [*]4 x 4 … ![]() | |
Re: Read these links and choose which one interests you the most: [LIST] [*][URL="http://en.wikipedia.org/wiki/Management_information_systems"]Management Information System.[/URL] [*][URL="http://en.wikipedia.org/wiki/Computer_science"]Computer Science[/URL] [/LIST] | |
Re: Since no one has mentioned about SMF(Simple Machine Forum Software), I will be the first person to recommend you to use SMF if you are looking for a free software. It has rich features and simple interface. [url]http://www.simplemachines.org/[/url] | |
Re: I don't know much since I only used to programming in VB6 and have never really tried to learn more about VB.NET. [LIST] [*]I think VB.NET is now cross-platform: [URL="http://www.mono-project.com/Main_Page"]Mono Project[/URL] [*]New features has been added such as: += -= *= \= ++ -- and function overload. [/LIST] | |
Re: Ancient Dragon said it all. [B]char[/B] in C/C++ actually is a 8-bits integer ranging from 0 to 255. So you can write something like this: [code] for( sChar = rand()%256; sChar == 34; sChar = rand()%256); [/code] | |
Re: [QUOTE=Prabakar;641660]Thank you [B]Salem[/B] You have fed me enough knowledge to convince my friends why not to use Turbo C.[/QUOTE] I was once trying to convince my teacher to convince my university to change the compiler; yet they still won't change it. Sadly, I have to learn with that old compiler. … | |
Re: Rap is just one genre of the music; some rap songs are very meaningful and very educated. | |
Re: [QUOTE=sham]What is the difference between simple form & MDI form?[/QUOTE] MDI (Multi Document Interface) Form is form that can hold multi forms inside it. | |
Re: [QUOTE=Moporho;561016]Sorry that was a quick typo! I get that number is a Prime. The question eluding me is it faster? Did I eliminate numbers being tested by using sqrt()? I know I shortened up the process, but it just does not seem faster to me. I ran both. How do … | |
Re: [QUOTE=henpecked1;561077]I'll probably gain you some corrections to my post that will give you insight, but as a new guy I can tell you a couple things. [b]I'm not sure why you chose int for main[/b], you could use void as you are only defining and outputting character strings[/QUOTE] Because the … | |
Re: Sorry, but I still don't understand what is "subset with maximum sum". Can anyone explain or give me more examples? | |
Re: [I]"How to make MMORPG game? I have a very great MMORPG game idea."[/I] | |
Re: [QUOTE=Max_Payne;498628]Does anyone know where can i get the game engine: LlamaWorks2D ?[/QUOTE] My good friend, google, might know this answer. | |
Re: [QUOTE=Duoas;534647][URL="http://www.cppreference.com/stdother/rand.html"]rand()[/URL] returns a value between 0 and RAND_MAX. You need to apply some math to bound that value. In C++, the remainder operator is [B]%[/B]. [inlinecode]int value = (rand() % 499) +1;[/inlinecode][/QUOTE] I believe the largest value that your code can generate is 499 :D | |
Re: Firstly, [icode]base8 = y*8^n[/icode] does not have semi-colon at the end of the statement. Secondly, ^ is not a power operator. I think you are confusing with Visual Basic. Moreover, [icode]x/10 = x;[/icode] and [icode]x %10 =y;[/icode] are not right. It should be [icode]x = x / 10[/icode]. | |
Re: [QUOTE=cscgal;495799]People are so cheap :) Even a few bucks a month is too expensive to safehouse your data.[/QUOTE] Not always true, some people don't have their own credit card. | |
Re: Honestly, I do not think your code work logically correct even if you had fixed the syntax error. I will demostrate how your code work in run-time: [I][B]Please enter the binary code: 100101[/B] total = 0, n = 6, i = 1 temp = 100101 % (1 * 10) = … | |
Re: Alternative way from Narue: [code=cplusplus] // input your num here. for (temp = num; temp > 9; temp /= 10) printf("%c", '0' + (temp % 10)); [/code] | |
Re: In order to write a code that able to find which number is a prime number, you need to know the definition of the prime number and write your code follow the definition. You'll able to find solution. | |
![]() | Re: I am not sure what you're looking for, maybe you mean [icode]continue;[/icode]? |
Re: [QUOTE=jaepi;522206]I was just thinking how would we call our farts if ever they do have a kind. Well, I came up with 3 kinds of 'em. [B]Loud and Proud[/B], [B]Silent but Deadly[/B] and the ultimate, [B]Wet and Wild[/B]. Which of these 3 you produce the most? hehehe...[/QUOTE] Interesting.... | |
Re: Before we could help you, you should help yourself learning. | |
Re: Personally, [B]using[/B] should be use whenever you use those functions in the large amount of time. For example: [icode]using std::cout;[/icode] and [icode]using std::cin[/icode] are the most common function that you use. These functions should use [B]using[/B] globally. For those functions which only use once in the code, should not be … | |
Re: Have anyone still remember the "Save VB6" thing? I found it is very similar to this case. | |
Re: For your redirecting question, you could use [icode]do...while[/icode] loop: [code=cplusplus] do { // input your code here } while (x < 1 && x > 5); // If the input isn't in the range of 1-4, it will process the code in the loop block again. [/code] | |
Re: You also able to optimize your code by doing this: [code] for ( [B]x=1[/B] ; temp1 > 0 ; [B]x*=10[/B]) { temp = temp1 % 8; output = output + temp * [B]x[/B]; temp1 = temp1 / 8; } [/code] It would preform faster than before. | |
| |
Re: OpenGL is graphic library, and DirectX is not only graphic library but also cover input, sound, network and many more. Then OpenGL create something call OpenAL for sound library. | |
Re: [QUOTE=olliedefig;504227]one of the best games ever was Swing a software 2000 game which company went bust. Worked on win 98 on xp the screen miserably divided into 4 and was unplayable the cd is cracked and anybody knows how to get a replacement or the game working would be happy[/QUOTE] … | |
Re: I don't feel that your code works 100% correctly. What's happen when the first digit is number 9? [icode]9 < 9 == false[/icode]. | |
Re: [code] #include <iostream> using namespace std; int main() { int [B]oddNum[/B], num, oddCount = 0; cout << "enter an integer: " << endl; cin >> num; while ([B]oddNum[/B] != 0 && num > 10) { [B]num = num % 10;[/B] oddNum = num % 2; [B]oddCount++;[/B] } cout << "number … | |
Re: Believe me, I will be the richest guy in the whole world, if I was back in 1982. 1) I will bet alot alot of money in World Cup, Euro Cup, Asia Cup. 2) Be the first person to make Search Engine, YouTube, Amazon, eBay and so on 3) and … | |
Re: [B]English:[/B] Welcome back! [B]Germany:[/b] Willkommen zurück [B]Greek:[/B] Καλως ηρθατε και παλι [B]Italy:[/B] Bentornato [B]Portuguese:[/B] Bem-vindo de volta [B]Russian[/B] Добро пожаловать обратно [B]Spanish[/B] Bienvenido de nuevo | |
Re: Is learning at school count? If it's not then 0 years for me | |
Re: Multi-player Massive Online Role-playing game, the best type of game of all. | |
Re: [B] “Just being alive is such a lovely and wonderful thing."[/B] from 1 Litre of Tear. [I]Based on a true story, One Litre of Tears is about the life story Kitou Aya (1962-1988) a girl who had an incurable disease called Spinocerebellar Degeneration Disease (also known as SCA type 2; … | |
Re: [QUOTE=zprise;514159]I still didn't get it. What exactly happens when the compiler meets if ((!a)++). why doesn't forward !a by 1 and the result will be true.[/QUOTE] [icode]a++[/icode] mean [icode]a = a + 1[/icode]. so [icode](!a)++[/icode] mean [icode]!a = !a + 1[/icode] which [icode]!a[/icode] is not a variable. | |
Re: [QUOTE=divyasoman20;513455]i am a Btech pre-final year student ..i would like to get guidence from any of u for selecting a good mini project for tis year...hope that som of u vl help me...[/QUOTE] Without knowing what you have learned in your school, it is hard for us to give you … | |
Re: Your code make no sense. You didn't declare choice[] and choice1 anywhere, how can you use those variable? You cannot return 2 values, but you can return in array. |
The End.