博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
c++立方函数_C ++程序使用函数查找数字的立方
阅读量:2508 次
发布时间:2019-05-11

本文共 620 字,大约阅读时间需要 2 分钟。

c++立方函数

#include<iostream.h>
#include<conio.h>

void main()
{


clrscr();                                                //to clear screen
float cube(float);                                  //function prototype
float a,cu;
cout<<“Enter any number:”;
cin>>a;
cu=cube(a);                                         //function calling
cout<<“nCube of “<<a<<” is “<<cu;
getch();
}

float cube(float a)
{


float cu;
cu=a*a*a;
return(cu);
}

#include<iostream.h>
#include<conio.h>

void main()
{


clrscr();                                                //to clear screen
float cube(float);                                  //function prototype
float a,cu;
cout<<“Enter any number:”;
cin>>a;
cu=cube(a);                                         //function calling
cout<<“nCube of “<<a<<” is “<<cu;
getch();
}

float cube(float a)
{


float cu;
cu=a*a*a;
return(cu);
}

翻译自:

c++立方函数

转载地址:http://ygwwd.baihongyu.com/

你可能感兴趣的文章
解决vmware与主机无法连通的问题
查看>>
做好产品
查看>>
项目管理经验
查看>>
笔记:Hadoop权威指南 第8章 MapReduce 的特性
查看>>
JMeter响应数据出现乱码的处理-三种解决方式
查看>>
获取设备实际宽度
查看>>
Notes on <High Performance MySQL> -- Ch3: Schema Optimization and Indexing
查看>>
Alpha冲刺(10/10)
查看>>
数组Array的API2
查看>>
为什么 Redis 重启后没有正确恢复之前的内存数据
查看>>
No qualifying bean of type available问题修复
查看>>
第四周助教心得体会
查看>>
spfile
查看>>
Team Foundation Service更新:改善了导航和项目状态速查功能
查看>>
WordPress资源站点推荐
查看>>
Python性能鸡汤
查看>>
android Manifest.xml选项
查看>>
Cookie/Session机制具体解释
查看>>
ATMEGA16 IOport相关汇总
查看>>
有意思的cmd命令
查看>>