“Fibonacci”是指“Fibonacci”。程序 [英] The "Fibonacci" Program

查看:67
本文介绍了“Fibonacci”是指“Fibonacci”。程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,请帮帮我吧!



1.(第一个程序)打印以显示需要的三角形:n行包括Fibinacci序列的n个元素。

(我成功打印斐波那契但不知道如何将其打印成三角形)

2.(第二个程序)打印屏幕帕斯卡三角...

(真的卡住这个......只知道逻辑但找不到算法来解决)



请仅使用循环,条件,......我只知道这些!! (Beginer):d



非常感谢!!!!

解决方案

看看 [ ^ ]。

或者你可能有谷歌搜索它。



BTW没有人会免费为你工作。作为你的功课,自己动手吧。正如你所说,你是初学者,从打印正常数字序列的小程序开始,然后逐步前进。发布问题如果你遇到一些代码或逻辑,你肯定会得到帮助。



一切顺利。


< blockquote> google中有很多链接用于那些..

http://my-source-codes.blogspot.com/2010/08/c-program-fibonacci-series-triangle.html [ ^ ]

http://www.programmingsimplified.com/c-program-print-pascal-triangle [ ^ ]


你可以写一个LineCenter函数打印出来。



例如:



bool LineCenter(char * text,int max linelen);

Hello, could you help me this please!

1.(1st program) Print to screen a triangle with this require: The "n"th row consists of n elements of Fibinacci sequence.
(I'm successfuly print the Fibonacci but do not know how to print it as a triangle)
2.(2nd program) Print to screen the Pascal Triangle...
(Really get stuck with this..know only the logic but can't find the algorithm to solve)

Please only use loop, condition,......i only know these!! (Beginer) :d

Thank you very much!!!!

解决方案

Have a look at this[^].
Or you could have googled it.

BTW no one would work for you for free. As its your homework, do it yourself. As you said, you are beginner, start with small programs like printing normal number sequence, then advance through step by step. Post the question if you are stuck with some code or logic, you'll definitely get help then.

All the best.


There are lot's of link in google for those..
http://my-source-codes.blogspot.com/2010/08/c-program-fibonacci-series-triangle.html[^]
http://www.programmingsimplified.com/c-program-print-pascal-triangle[^]


You could write a LineCenter Function to print out.

For Example:

bool LineCenter(char *text, int maxlinelen);


这篇关于“Fibonacci”是指“Fibonacci”。程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆