Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - kriminal

Pages: [1]
1
Other / Re: I need a HELP!!
« on: September 04, 2011, 08:59:05 pm »
  • #include <iostream.h>
  • int main()
  • {
  •     int n, i, sum;
  •     cout << "Enter a value for n: ";
  •     cin >> n;
  •     sum = 0;
  •     i = 1;
  •     do
  •     {
  •         sum += i*i;
  •         i++;
  •     }while (i <= n);
  •     cout << "The sum of the first " << n
  •     << " numbers is " << sum << endl;
  •     return 0;
  • }

This is my idea. Not yet compiled.

2
Other / Re: I need a HELP!!
« on: September 04, 2011, 07:41:47 pm »
I don't have an idea about this problem. Can anyone who can teach me how to solve this problem in C++ using for loop..


Write a program to scan a number n and then output the sum of the squares from 1 to n. Thus, if the input is 4, the output should be 30 because:

            12 + 22 + 32 + 42 = 1+4+9+16 = 30

3
Other / Re: I need a HELP!!
« on: September 03, 2011, 07:26:24 am »
Is C and C++ programming have a big difference?

4
Other / Re: I need a HELP!!
« on: September 02, 2011, 06:50:22 am »
Okay! Thank you so much for the help.
Can I ask your help again when I have problems regarding C++ programming?

5
Other / Re: I need a HELP!!
« on: September 02, 2011, 06:32:39 am »
It's ok now sir. Thank you so much!!!
Can you be my teacher? If you don't mind. Because I want to know more about C++ programming.

6
Other / Re: I need a HELP!!
« on: September 02, 2011, 06:01:34 am »
There's missing sir.
The output of your code is 54321
The output should be like this 5,4,3,2,1,1,2,3,4,5
Can your show me how? please!

7
Other / Re: I need a HELP!!
« on: September 01, 2011, 11:45:35 pm »
I just want to know if my code is correct.

8
Other / Re: I need a HELP!!
« on: September 01, 2011, 10:48:53 pm »


#include <iostream.h>
int main()
{
   int max=2, i;
   for(i=0; i<max; i++)
      cout<<"5,1,4,2,3 ", max-i, i+1;
   return 0;
}
Thank you sir, your code is great help for me.


The output that is 5,1,4,2,3,5,1,4,2,3


How can I make that output  in this form: 5,1,4,2,3,3,2,4,1,5

9
Other / Re: I need a HELP!!
« on: September 01, 2011, 11:49:21 am »
thank you for that but maybe there some mistake because only X1 shows in the prompt without stopping... can u fix that problem?? PLEASE!!!

10
Other / I need a HELP!!
« on: August 24, 2011, 01:12:39 pm »
A program that produces a sequence number (in alternate arrangement or in reverse order) using for loop, while loop, and do while loop statements.


example output:
5,1,4,2,3,3,2,4,1,5


Kindly help me with this please!
I'm having a self study here...

Pages: [1]