程序描述
一个数的平方是该数乘以自身。
一个平方数或完全平方是一个整数,它是一个整数的平方;
完全平方数是整数的平方。
1, 4, 9, 16, 25, 36, 49, 64, 81, 100
这里是从1到100的所有完全平方数的平方根。
√1 = 1 since 12 = 1√4 = 2 since 22 = 4√9 = 3 since 32 = 9√16 = 4 since 42 = 16√25 = 5 since 52 = 25√36 = 6 since 62 = 36√49 = 7 since 72 = 49√64 = 8 since 82 = 64√81 = 9 since 92 = 81√100 = 10 since 102 = 100
A non-perfect square is every number that is not the result of squaring an integer with itself.
立即学习“C语言免费学习笔记(深入)”;
The below numbers are non-perfect square numbers
2,3,5,6,7,8,10,11,12,13,14,15,17,18,19,20,21,22,23,24,26 etc…
算法
Check all numbers from 1 to the user specified number.Check if it is perfect square or not.If not a perfect square, print the Non Perfect Square Number.
Example
的中文翻译为:
示例
/* Program to print non square numbers */#include #include
输出

以上就是打印C语言中的非平方数的详细内容,更多请关注创想鸟其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/1443639.html
微信扫一扫
支付宝扫一扫