advertise here
Showing posts with label c++. Show all posts
Showing posts with label c++. Show all posts

How to write C++ program to find Fibonacci Series

By: // No comments:

Fibonacci Series or Sequence in C++

Today in C++ Tutorial we will learn How to write C++ program to find Fibonacci Series.The Fibonacci Sequence can be written as 0,1,1,2,3,5,8,13........

What is Fibonacci Series or Sequence

The Fibonacci numbers or Fibonacci series or Fibonacci sequence has first two numbers equal to 1 and 0 and the further each number is consist of the addition of previous two numbers.

1st number = 0
2nd number = 1
3rd number = 0+1= 1
4th number = 1+1= 2
5th number = 1+2= 3
And so on.


The Fibonacci Sequence can be written as 0,1,1,2,3,5,8,13........

Fibonacci Series program logic 

  • Before writing C++ Program we must know that what is Fibonacci Series and in what sequence numbers occurs.
  • After understanding mathematically Fibonacci series completely we write it in the form of C++ Program.
  • As the Fibonacci series is infinite but we can't make a program that display an infinite output.
  • In below program we take input the range in integer up-to which Fibonacci series will be displayed.
  • For this purpose a for loop has been taken which starts from 0 and terminates less than range for example if Input is 5 then for loop will run from 0 to 4.
  • In for loop if variable 'c' is less or equal than 1 in this case if statement will be executed and if 'c' is greater than 1 else part will be executed for greater than 1.
e.g., if range=2 than only
if part will run. let input is equal to 5
Before loop variables values

How to write C++ program to find Fibonacci Series

Lets have a Look at C++ program to find Fibonacci Series upto given Limit.
This C++ program use simple logic to get the concept of writing code in C++ for Fibonacci Series.

C++ program to find Fibonacci Series

#include<iostream>
using namespace std;
int main()
{
int range, first = 0, second = 1, result=0;
cout << "Enter Range for Terms of Fibonacci Sequence: ";
cin >> range;
cout << "Find Fibonicci Series upto : " << range << " Terms "<< endl;
for ( int c = 0 ; c < range ; c++ )
{
if ( c <= 1 )
result = c;
else
{
result = first + second;
first = second;
second = 
result;
}
cout <<
result <<" ";
}
return 0;
}

C++ PROGRAMMING EXAMPLE CODES

Write ALLAH Using C++ Program

How to write C++ program to find Fibonacci Series

How to Write C++ Program to Find Prime Number

How to write C++ Program to find factorial of Number

What is Recursive function in c++ with Examples

C++ program to Make Simple calculator

Find the HCF and LCM by using the C++

Tags: c, c++, c++ tutorials, Programming in C++, write a c++ program, Fibonacci Series, Fibonacci series in c++, Fibonacci series in cplusplus, Fibonacci series logic, program to find Fibonacci series, what is Fibonacci series, 

If you have any queries related to How to write C++ program to find Fibonacci Series please comment below:

Write ALLAH Using C++ Program

By: // 2 comments:

Write ALLAH Using C++ Program

Aslam o Alaikum Write Allah with c++ Please download the attached file given below Feel free to ask any question related to programming.
How to Write Standard Code in C++. There are infinitely many ways to program computers. Ultimately, it is the choice of the programmer.
This Program will print ALLAH words in C++

Attachments:

You Can Download Solved Final term Papers, Short Notes, Lecture Wise Questions Answers Files, Solved MCQs, Solved Quizzes , Solved Final term Subjective Papers , Solved Final term Objective Papers From This Discussion For Preparation Final term Papers of Fall 2015

C++ Programming language video tutorial free download

By: // 2 comments:

C++ Programming language video tutorial

C++ programming Essential video Training download these lectures from google drive that i have shared below.
C++ Programming language video tutorial
If you are getting any error while downloading then you may post any question in comment that how to solve.
Click Here to Download C++ programming video lectures

downloaded file will required Password: songo.in


46 items


001 Welcome.mp4

002 Using Xcode with the exercises.mp4

003 Using Microsoft Visual Studio Express with the exercises.mp4

004 What is C++.mp4

005 Introduction to basic syntax.mp4

006 Anatomy of a C++ program.mp4

007 Statements and expressions.mp4

008 Identifiers.mp4

009 Defining variables.mp4

010 Pointers.mp4

011 References.mp4

012 Arrays and strings.mp4

013 Conditionals.mp4

014 The branching conditional.mp4

015 Looping with while and do.mp4

016 Iterating with for.mp4

017 Using the range-based for loop.mp4

018 Using stdout.mp4

019 Overview of C++ functions.mp4

020 Defining a function.mp4

021 Passing values to a function.mp4

022 Using automatic and static variables.mp4

023 Returning values from a function.mp4

024 Using function pointers.mp4

025 Overloading function names.mp4

026 Overloading operators with functions.mp4

027 Defining a variable number of arguments.mp4

028 Using recursion.mp4

029 About the preprocessor.mp4

030 Using macros as constants.mp4


Also read about :
Dev C++ Problem with 64 bit and its solution


You Can Download Solved Mid Term Papers, Short Notes, Lecture Wise Questions Answers Files, Solved MCQs, Solved Quizzes , Solved Mid Term Subjective Papers , Solved Mid Term Objective Papers From This Discussion For Preparation Mid Term Papers of Fall 2014
For important helping material related to the subject ( Solved MCQsAssignmentsShort NotesSolved Past Papers, E-Books, Recommended Books, FAQs, Help & Tutorials , Short Questions Answers & more). You must view all the featured discussion in this subject group.

Dev C++ Problem with 64 bit and its solution

By: // 4 comments:
welcome to CS201 Virtual University Students Help Tutorial.
I saw many students facing Dev C++ Problem with 64 bit. Here is the Solution of Dev C++ Problem with 64 bit.

so heres the solution and some things u should know about.
the header file <iostream.h> is no more supportable in new versions of DevC++ so this header file does not exit in Dev Library.

You should Also Read:


So here's are 2 Solution ideas:

Dev C++ Solution :1

If u want to do same as given in handouts, the old version
then download the attached file and add that file in the following directory
C:\Program Files (x86)\Dev-Cpp\MinGW64\include
You will see the warning , but your C++ code will be compile and will run In shaa Allah

Dev C++ Solution : 2

1. Use #include <iostream> instead of <iostream.h>
2. As all the all the library classes are in the std:: namespace, so add using namespace std;
3. and whenever you will use cout or cin or other iostream functions add std:: with them
here's a sample of your first program.



same as if u want to take some Input from user here it is:

I

hope it will be Help You all.

Download Dev c++ iostream.h File

Dev C++ Attachments:

iostream.h, 2 KB

You Can Download Solved Mid Term Papers, Short Notes, Lecture Wise Questions Answers Files, Solved MCQs, Solved Quizzes , Solved Mid Term Subjective Papers , Solved Mid Term Objective Papers From This Discussion For Preparation Mid Term Papers of Fall 2014
For important helping material related to the subject ( Solved MCQs, Assignments, Short Notes, Solved Past Papers, E-Books, Recommended Books, FAQs, Help & Tutorials , Short Questions Answers & more). You must view all the featured discussion in this subject group.

Equipment Functions of a Computer System

By: // No comments:

Equipment Functions of a Computer System

There are four main equipment functions of a computer system:
Input, Processing, Storage and Output


Also Read : Programming in C++ , A Brief History


Equipment Functions of a Computer System

Input: the transferring of information into a computer system - for our purposes this will be accomplished when you, the programmer, type source code at the keyboard or open a previously typed program.

Processing: the manipulation and control of information within the computer system. Such manipulations are handled by the Control Unit, the Arithmetic Logic Unit and Temporary Storage.

Storage: the means by which information can be "permanently" saved (until such time as you wish to delete it). This usually occurs on a hard drive, a diskette or a CD.

Output: the displaying of information - for our purposes this will be accomplished when your program displays information on the monitor or printed on paper.