# Data Structures in C Chapter 1

Source: Internet
Author: User

Data Structures in C

Machinery Industry Press

Ellis horrowitz, Sartaj Sahni, by Susan Anderson-freed

Translated by Li Jianzhong, Zhang Yan, and Li Zhijun

1.2.2 Calculation of polynomials Based on the Horna rule

1.2.10 Recursive Implementation of the Ackerman Function

1.2.11 Recursive Implementation of the tower

 # Include # Define max 20Int main (){Float a [Max];Float x0;Float sum;Int N;Printf ("Enter the maximum number of polynomials you want to calculate n \ n ");Scanf ("% d", & N );Printf ("Enter the value from A0 to an: \ n ");For (INT I = 0; I

 # Include Void hannuota (INT, Char, Char, char );Void mov (char, char ); Void main (){Int N;Printf ("Enter the initial number of disks on A: \ n ");Scanf ("% d", & N );Hannuota (n, 'A', 'B', 'C ');} Void hannuota (int n, char a, char B, char C){If (n = 1) mov (a, c );Else{Hannuota (n-1, 'A', 'C', 'B ');MoV (a, c );Hannuota (n-1, 'B', 'A', 'C ');}} Void mov (char P, char q){Printf ("Move: % C --> % C \ n", p, q );}

Related Keywords:
Related Article

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

## A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

• #### Sales Support

1 on 1 presale consultation

• #### After-Sales Support

24/7 Technical Support 6 Free Tickets per Quarter Faster Response

• Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.