Blaylok's Profile User Rating: -----

Reputation: -2 Dishonored
New Members
Active Posts:
7 (0.01 per day)
19-August 12
Profile Views:
Last Active:
User is offline Apr 29 2013 09:00 AM

Previous Fields

OS Preference:
Favorite Browser:
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Who Cares
Dream Kudos:
Icon   Blaylok has not set their status

Posts I've Made

  1. In Topic: C++ do while loop not working right

    Posted 4 Oct 2012

    View PostSkydiver, on 04 October 2012 - 08:44 PM, said:

    Please do not encourage people to use goto's. That could have have been written using a do-while loop like the original code.

    I used the goto statement because the do while statement somehow did not work, and the while statement was not the best one for that.
  2. In Topic: C++ do while loop not working right

    Posted 4 Oct 2012

    Hold on... Just chillax!! I'll help you out! :D

    The right way for the condition is putting && between the conditions. This is because, -1 will be less than 100, so one of the conditions will result true and the other will be false. So if you put || instead of && then the loop will take numb as -1. But if we put &&, then both conditions have to be satisfied. So the loop will again ask for the number.

    Now, I tried with &&, but this loop still behaves in the same way. So it is better to write with an if condition.

      cout << "Enter an integer between 1 and 100" << endl;
      cin >> numb;
    		goto INPUT;

    This works perfectly. But I think it wont show the correct answer as there are more errors following it.

    |I| for (j=numb; j>=0; j++)

    This will lead you to infinite loop. As j (numb) will always be greater than 0! So the condition you should put is:

    for (j=numb; j<=100; j++) //or j=j+1 (in the updation statement

    |II| cout <<"\n <<j<< " << endl;

    I have no idea what you are trying to do in this statement. But if you want to show the value of j every time then it should have been

     cout << "\n" << j << endl; 

    |III| sum = sum - j;

    It should be sum = sum + j;. We are adding numbers and not subtracting.


    So, I'll give you a corrected one.

    #include <iostream.h>
    int main()
      int j, numb, sum;
      cout << "Enter an integer between 1 and 100" << endl;
      cin >> numb;
    		goto INPUT;
      sum = 0;
      for ( j=numb; j<=100; j=j+1 )
    	     cout <<"\n"<< j << endl;
    	     sum = sum  + j;
    	 cout << "\n Sum = " << sum << endl;
  3. In Topic: What are you working on today?

    Posted 3 Oct 2012

    Well... I'm working on an OS. I have just designed the basic kernel of it. It'll be like a Quad-Core Kernel, with 4 different parts working independently so that we get the maximum speed from the software part. Now I'm working with it's coding part! :D
  4. In Topic: VB6 Roll Call

    Posted 19 Aug 2012

    I have worked on VB6 and have about 3 years of experience. I made the following programs:

    1: Surf (Web browser) |Download|
    2: Writer (Text editor) |Download| [key to open writer: 1a2b3c4d]
    3: Media Studio (Media player) |Download|
    4: Advanced System Monitor |Download|
    (mediafire password to the above files is: givememycopy)

    and many other small programs like Facebook direct, Advanced System Monitor which gives you the direct access to facebook (you dont have to open your browser).

    I love programming in Visual Basic. Well, if you would ask me, my talent lies in programming and that is why I continue to do it. Presently I do both, VB6 as well as c++ and html.

  5. In Topic: Fibonacci challenge

    Posted 19 Aug 2012

    A better way to do fibonacci sequence using looping technique is:

    Please enter the number of terms: 8
    1 1 2 3 5 8 13 21


    Hope that works! :)

My Information

Member Title:
New D.I.C Head
Age Unknown
Birthday Unknown
Full Name:
Naveen Venkat
Years Programming:
Programming Languages:
VB6, C++, HTML

Contact Information



Blaylok hasn't added any friends yet.


Blaylok has no profile comments yet. Why not say hello?