Question about Computers & Internet

Ad

Hi,

I think you are one good student with interest in C++. I am reminded of my days in college. When my teacher asked me the same question, I wrote it in three formats. I am putting them all here. Wish you a very good learning time in the world of C/C++

Type 1:

********

#include<stdio.h>

void main()

{

int n;

int fibo(int,int,int);

printf("\nEnter number of terms in series:");

scanf("%d",&n);

fibo(n,0,1);

}

fibo(int n,int a,int b)

{

int c;

printf(" %d ",a);

c=b;

b+=a;

a=c;

if(n>0) fibo(n-1,a,b);

return 0;

}

Type 2:

********

#include<stdio.h>

void main()

{

int i,j,a=0,b=1,c;

printf("\nEnter number of terms in the series:");

scanf("%d",&i);

for(j=1;j<=i;j++)

{

printf(" %d ",a);

c=b;

b=a+b;

a=c;

}

}

Type 3:

********

#include<stdio.h>

void main()

{

int i,a=0,b=1,c;

printf("\nEnter number of terms in series:");

scanf("%d",&i);

while(i>0)

{

printf(" %d ",a);

c=b;

b=a+b;

a=c;

i--;

}

}

**************************

Come back anytime for any program in basic C++. All my old codes wrote during my college days are lying without any use. :)

Have a nice day.

Posted on Nov 28, 2008

Ad

Here is a Pascal stub

================

Program Fibonacci;

const

nmax = 500;

type

t_Farray = array [0 .. nmax-1] of LongInt ;

var

Farray : t_Farray;

i : word;

Begin

Farray [0] := 0; writeln(Farray [0]); // Initialize the ******

Farray [1] := 1; writeln(Farray [1]); //

for i:=2 to nmax-1 do begin

Farray[i] := Farray[i-2] + Farray[i-1];

Writeln (Farray[i]

end;

end.

Posted on Nov 13, 2008

Ad

Ok! Here's a snippit from some code I wrote in beginning c++ classes. However, don't just cut and paste it. Know how it works since it's important in algorithm examination!

Just tested it, compiles and runs perfectly on GCC 4.0.1 on my mac, as well as my linux boxen. Windows may take some changes to output data.

/***********************************************

* Steven Parker

* Calculating Fib Sequence

* after two starting values, each number is the

* sum of the two preceding numbers

***********************************************/

#include <iostream>

using namespace std;

int main() {

int whentostop = 20; //How many values of sequence to calculate

int fib[whentostop]; //Hold fib numbers

for (int i=0; i < whentostop; i++) {

if (i == 0)

fib[0] = 0;

else if (i == 1)

fib[1] = 1;

else

fib[i] = fib[i-1] + fib[i-2];

cout << "Fibonacci[" << i << "]: " << fib[i] << endl;

}

return 0;

}

Posted on Nov 13, 2008

Hi,

a 6ya Technician can help you resolve that issue over the phone in a minute or two.

Best thing about this new service is that you are never placed on hold and get to talk to real repair professionals here in the US.

click here to Talk to a Technician (only for users in the US for now) and get all the help you need.

Goodluck!

Posted on Jan 02, 2017

Connect the calculator to the computer and turn it ON. Open the TI connect software. Locate your file on your computer, do a CTRL C to copy. Drag and drop the file on the Main window of TI connect. If file is compatible with TI 84 Plus, it will be transferred to your calculator. Use the Memory management of the calculator to locate the transferred file in calculator.

Dec 17, 2013 | Texas Instruments TI-84 Plus Silver...

I just posted an answer to a question, and I believe it answers yours and a bit more.

They are in chronological sequence. If not just rearrange the sequence.

- Arrange you data in ascending order
- Determine the frequency of each datum (for un-grouped data)
- Turn Calculator ON
- Press the MENU key
- Highlight STAT icon and press EXE
- Enter the data item in list1 and frequency in list2
- When finished entering data press F1:Graph
- Select Graph1, Graph2 or Graph3 or SET to fine tune
- Select the Type of graph (Histogram)
- Select the lowest boundary of the first class (to align)
- Set the class width
- Press EXE to draw.

They are in chronological sequence. If not just rearrange the sequence.

Apr 02, 2011 | Casio FX9750GII Graphic Calculator

I have a TI-83 and there has been a dark spot on my screen for several years and it has not been a problem. Try to use yours for as long as possible unless the screen is unviewable.

Mar 04, 2011 | Texas Instruments TI-84 Plus Calculator

Hi, to turn on the "Calculator; click on the "Start Button," next in the [Start Search] window, type: calculator, scroll to find the "Calculator Short-cut" in the listings, and click on it to open. "Thanks for using Fix'Ya; you can rate the help if you like."

Jul 02, 2010 | Toshiba Satellite A135-S2276 Notebook

The keystrokes you would use to solve the problem is as follows:

(I will use the / to indicate the division symbol)

.5

/

6

X

[( key

12

X

6

)] key

X

1

/

2

X

[( key

6

X

14)] key

=

(I will use the / to indicate the division symbol)

.5

/

6

X

[( key

12

X

6

)] key

X

1

/

2

X

[( key

6

X

14)] key

=

Jun 08, 2010 | Casio FX-250HC Calculator

you may need more light but there are batteries in your calulator and you need to replace them check on the back cover for what type you need .

Oct 08, 2009 | Texas Instruments Explorer Plus Scientific...

Hello,

If you are comfortable manipulating such an expression, I suspect your are also very able to scour the research litterature to find out if the unsung hero who has found a way to express the pressure in some non ideal fluid with 6 virial coefficients, has also provided a short and sweet way to solve for the temperature. (My guess).

To lift any ambiguity in the expression use extra parentheses in your last term:where does the denominator stop?

My suggestion is that you write a program to solve numerically for T or use some powerful software like Mathematica to obtain an analytical solution.

Good luck.

If you are comfortable manipulating such an expression, I suspect your are also very able to scour the research litterature to find out if the unsung hero who has found a way to express the pressure in some non ideal fluid with 6 virial coefficients, has also provided a short and sweet way to solve for the temperature. (My guess).

To lift any ambiguity in the expression use extra parentheses in your last term:where does the denominator stop?

My suggestion is that you write a program to solve numerically for T or use some powerful software like Mathematica to obtain an analytical solution.

Good luck.

Mar 02, 2009 | Casio FX-300MS Calculator

take scientific calculator and solve it .scientific calculator also help u in future.or either go to start option and use ur computer calulator in scientific mode

Jun 10, 2008 | Microsoft Office Outlook 2003 for PC

The y^x button is right next to the x^2 button. It is labled with an x raised to a square box (which I will write as x^box). Thus, if you enter (for example)

2 x^box 5 = 32

2 x^box 5 = 32

Mar 30, 2008 | Casio FX-115ES Scientific Calculator

161 people viewed this question

Usually answered in minutes!

×