tn = t1+(n-1)d -- for arithmetic
tn = t1rn-1 -- for geometric
Chat with our AI personalities
The Nusselt number is proportional to the Prandtl number to the nth power, where n is a positive number less than one.
A brief description allowing the reader to identify the image and its significance, and a figure number correlating to the sequence of images in the book
Type this into Dev-C++ and run it. You will be able to find whatever harmonic number you want. This may not be perfect because I wrote it in about 10 minutes, but I think it works just fine. Good luck!#include double seq(double x);double seq(double x) {double temp=0;if (x==0)return 0;return 1/x + seq(x-1);}int main() {double x, y;while (x != 0) {printf("Please enter a number:\n");scanf("%lf", &x);y = seq(x);printf("The sequence of that number is: %lf\n", y);}system("PAUSE");return 0;}
<html> <body> <script type="text/vbscript"> Dim a, b, c, n, nth a = 0 b = 1 n = Cint(InputBox("Enter the value of ""n""")) For nth = 1 to n Step 1 Document.Write(b&"<br/>") c = a + b a = b b = c Next </script> </body> </html>
In a Fibonacci sequence, sum of two successive terms gives the third term.... here is the Fibonacci sequence: 0,1,1,2,3,5,8,13,21,34,55,89,144........ General formula to generate a Fibonacci sequence is """Fn= Fn-1 + Fn-2""" To check whether a number is Fibonacci or not follow the following steps: 1) Get the number as input from user. 2) Fix the first two numbers of sequence as 0 and 1. 3) put a sentinel loop with upper limit being the input number. 4)in the body of loop generate the next number in sequence in each iteration and continue swapping the values as follows: a=0 b=1 next=a+b while (next< input) a=b b=next next=a+b wend 5) lastly when program exits the loop compare the last number of sequence with the input number if they are equal then number is Fibonacci otherwise not. otherwise the last term of sequence will be less than the input number.