Welcome to Dream.In.Code
Become a C++ Expert!

Join 149,928 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,794 people online right now. Registration is fast and FREE... Join Now!




Help with a displaying root

 
Closed TopicStart new topic

Help with a displaying root

james evans
5 Dec, 2007 - 06:28 PM
Post #1

New D.I.C Head
*

Joined: 4 Dec, 2007
Posts: 5


My Contributions
CODE
//Ch7AppE12.cpp – displays the squares of the numbers from 1 through 5
//Created/revised by <your name> on <current date>

#include <stdio.h>
#include <math.h>

int main(void)
{
   int root = 0;

   // Any input
  for (int root = 5; root <= 1; root = root - 1)
           root = root - 1;
}
   // Divide by 5 until root < 1
   while (root > 1) {
      root = root/4;
      cnt++;
  
   x1 = 1.0;
   x2 = (root -1)/2;
   x3 = x2*(root -1)/4;
   x4 = x3*(3/8)*(root -1)/(3*2);
   x5 = x4*(15/16)*(root -1)/(4*3*2);

  square = x1 + x2 - x3 + x4 - x5;

  
   return 0;

}
User is offlineProfile CardPM
+Quote Post

NickDMax
RE: Help With A Displaying Root
5 Dec, 2007 - 06:58 PM
Post #2

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,869



Thanked: 53 times
Dream Kudos: 550
My Contributions
...we just suspended someone's account for posts like this one... I would hate to see your account get suspended as well.

Descriptive titles.
description of what your problem is.
User is offlineProfile CardPM
+Quote Post

Closed TopicStart new topic
Time is now: 1/8/09 03:15PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month