Identification division. Program-id. Fibonacci. Environment division. Data division. Working-storage section. 77 n pic 9(18). 77 n1 pic z(18). 77 m pic 9(18) value 1. 77 o pic 9(18). 77 i pic 9(4) value 1. 77 q pic x. Procedure division. Para-a. Display ( 1 , 1 ) erase. Display ( 2 , 1 ) "fibonacci numbers from 1 to 100 are:". Move 0 to n. Display " ". Display 0. Display 1. Move 0 to o. Para-b. Compute n = o + m. Move n to n1. Move m to o. Move n to m. Display n1. Add 1 to i. If i = 21 display "press tab key to view next page." accept q. If i = 41 display "press tab key to view next page." accept q. If i = 61 display "press tab key to view next page." accept q. If i = 81 display "press tab key to view next page." accept q if i = 99 go to stop-para else go to para-b. Stop-para. Display " ". Stop run.
Chat with our AI personalities
The Importance of Fibonacci's series is that it helps people find more patterns 1+0=1 1+1=2 1+2=3 2+3=5 5+3=8 etc.
COBOL was originally designed by Grace Hopper and is on of the oldest programming languages. The name stands for Common Business Orientated Language. More information can be found at websites such as Wikipedia.
Find about microfocus Cobol at below link http://www.applicationporting.org/2013/05/what-is-micro-focus-cobol.html#.UaLwfaIwfMk
A worker with knowledge and experience of Cobol can find employment as a computer programmer. A job available to someone with more experience and a mastery of Cobol would be in maintaining mainframe computers.
In c: int fibr(int n) { // Find nth Fibonacci number using recursion. if (n<=2) return 1; // the first two Fibonacci numbers are 1 and 1 return (fibr(n-2)+fibr(n-1)); } int fibi(int n) { // Find nth Fibonacci number using iteration. int temp,last=1,f=1; int i; for (i=3;i<n;++i) { // the first two Fibonacci numbers are 1 and 1 temp=f; f+=last; last=temp; } return f; }