Search Results

Showing results 1 to 2 of 2
Search took 0.00 seconds.
Search: Posts Made By: stewie griffin ; Forum: C and child forums
Forum: C Jul 25th, 2008
Replies: 10
Views: 2,146
Posted By stewie griffin
Hi, this is the algorithm to calculate pi,
Pi = 4-4/3+4/5-4/7+4/9...= 4*((-1)^n+1)/2n-1
It's very similar to your need


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

int main()
{
Forum: C Jul 12th, 2008
Replies: 23
Views: 1,565
Posted By stewie griffin
This function resave number, if the number is 0 its return true else its return false.
The Boolean " a & 7 ;" says if a != 0 and 7 != 0 then 1 else 0
Has you see the 7 is not needed
Showing results 1 to 2 of 2

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC