首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴StarLiver的代码贴全部
/*
2022年3月29日17点24分
程序作用:输出所有的水仙数,即:一个三位数,其各位数字立方和等于该数本身。
*/

#include <iostream>
#include <cmath>
using namespace std;

int main()
{
    for(int i = 100; i <= 999; i++)
......................
阅读全部 | 2022年3月29日 17:25
/*
2022年3月29日17点07分
程序作用:输出给定范围内的所有质数
*/

#include <iostream>
#include <cmath>
using namespace std;

bool IsPrime(int n)
{
    bool IsPrime = false;
......................
阅读全部 | 2022年3月29日 17:07
/*
2022年3月29日16点34分
程序作用:输出斐波那契数列的第n项
程序特点:使用了递归算法
*/

#include <iostream>
using namespace std;

int f(int n)
{
    int i;
......................
阅读全部 | 2022年3月29日 16:34
/*
2022年3月29日14点58分
程序作用:输出斐波那契数列的前n项
*/

#include <iostream>
using namespace std;

int main()
{
    int a1 = 1, a2 = 1;
    int n;
......................
阅读全部 | 2022年3月29日 16:03
/*
2022年3月29日14点58分
程序作用:输出九九乘法表
*/

#include <iostream>
using namespace std;

int main()
{
    for (int i = 1; i <= 9; i++)
    {
......................
阅读全部 | 2022年3月29日 14:58
/*
2022年3月29日14点26分
程序作用:输入三个整数x,y,z,把这三个数由小到大输出。
程序特点:使用了指针
*/

#include <iostream>
using namespace std;

void exchange(int * a, int * b)
{
    int t;
......................
阅读全部 | 2022年3月29日 14:40
/*
2022年3月29日14点26分
输入三个整数x,y,z,把这三个数由小到大输出。
*/

#include <iostream>
using namespace std;

int main()
{
    int x, y, z;
    cout << "请依次输入三个整数,用空格隔开" << endl;
......................
阅读全部 | 2022年3月29日 14:27
/*
2022年3月29日14点15分
输入年份、月份、日期,输出这一天是该年份下的第几天。
*/

#include <iostream>
using namespace std;

int run(int year)
{
    if (year % 4 == 0 && year % 100 != 0) return true;
    else if (year % 400 == 0) return true;
......................
阅读全部 | 2022年3月29日 14:16
上一页 1 2
StarLiver