Question about Computers & Internet

3 Answers

I need solve this type calulation is 0,1,1,2,3,5,8,13,21,34 etc. u send me the code of this type of calculation in c++ language

Posted by on

3 Answers

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that got 5 achievements.

    Novelist:

    An expert who has written 50 answers of more than 400 characters.

    Champion:

    An expert who has answered 200 questions.

  • Expert
  • 202 Answers

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

  • Chintu-KPV
    Chintu-KPV Nov 28, 2008

    Forgot to tell you one thing,

    The IO statements in my programs are all in 'C' level only. Use IOSTREAM class members for the same, if you want the program to look like a 'real' C++ one. :)

×

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that got 5 achievements.

    Novelist:

    An expert who has written 50 answers of more than 400 characters.

    Governor:

    An expert whose answer got voted for 20 times.

  • Expert
  • 150 Answers

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

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that got 5 achievements.

    Governor:

    An expert whose answer got voted for 20 times.

    Scholar:

    An expert who has written 20 answers of more than 400 characters.

  • Expert
  • 95 Answers

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

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert 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 repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

The system cannot find the file specified


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...

1 Answer

How do you enter grouped data into STAT section of calulator. Eg if you had frequency 40 for x=5, frequency 37 for x=6.7 etc of statitical data, (eg 400 data entries?). Rather that entering every...


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

  1. Arrange you data in ascending order
  2. Determine the frequency of each datum (for un-grouped data)
  3. Turn Calculator ON
  4. Press the MENU key
  5. Highlight STAT icon and press EXE
  6. Enter the data item in list1 and frequency in list2
  7. When finished entering data press F1:Graph
  8. Select Graph1, Graph2 or Graph3 or SET to fine tune
  9. Select the Type of graph (Histogram)
  10. Select the lowest boundary of the first class (to align)
  11. Set the class width
  12. Press EXE to draw.
Here aree some screen captures to help you along.
They are in chronological sequence. If not just rearrange the sequence.

k24674_80.jpg

k24674_81.jpg

k24674_82.jpg

k24674_83.jpg

k24674_84.jpg

Apr 02, 2011 | Casio FX9750GII Graphic Calculator

1 Answer

Hello, my name is Michiko Bursey, and I dropped by TI-84 graphing calulator. It still gives out correct answers to solved math and chemistry problems, but sometimes a small or medium ink blot (blue) ...


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

1 Answer

How do you turn on calulator?


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

1 Answer

How do i use my calulator to slove this problem .5/6(12x 6) 1/2(6x 14) I need to know how to program and use my calulator for a basic algebra class


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
=

Jun 08, 2010 | Casio FX-250HC Calculator

1 Answer

Explorer plus calculator display dims as more numbers are entered. No battery is present in this style 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...

1 Answer

How To Calulate??.


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.



Mar 02, 2009 | Casio FX-300MS Calculator

1 Answer

Trigonometry


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

2 Answers

How do I calculate exponential functions?


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

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

Not finding what you are looking for?

Open Questions:

0 Answers

Expert%*+-%1+877+778+89+69%*+-%Norton Antivirus Support Phone Number? Call 1-877-778-89-69 is followed by great amount of people because this number is used for solving the issue of virus's problem . It works with the assistance of Nortan Antivirus support phone number and therefore the number is 1-877-778-89-69.Our expert will give advice to you how can you protect better and faster your pc's or Laptop and other devices.Our Team is very experts and experienced. Nortan antivirus offer technical support in a very price effective manner by means that of tollfree service at 1-877-778-89-69.Sometimes customer face the problem of pc or laptop hanging.you must tried to use that number to solve the problem of virus's or hanging problem.Our expert always available for solve the problem you just dial 1-877-778-89-69 and your problem will solved in sort time.So use that number for any Antivirus problem.It provide the facility of shorter wait time and faster help.If your computer is infected please call 1-877-778-89-69.USA TollFree No:-1-877-778-89-69.Our customer Centre is all Always Opened in24*7.We are Nortan Antivirus Support USA. For Any Query Call US :-1-877-778-89-69 . Norton Antivirus Support Phone Number, Norton Antivirus Customer Service Phone Number, Norton Antivirus Tech Support Phone Number, Nortan Antivirus support Helpline Number, Nortan Customer support Telephone Number.Nortan Helpdesk number,Nortan Tech support Telephone number,Nortan Antivirus Tech Support Number,Nortan Internet Security Customer Number,Nortan Customer Service Technical Support Number.

May 24, 2017 | Norton Computers & Internet

Computers & Internet Logo

Related Topics:

157 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...