- 博客(4)
- 收藏
- 关注
原创 复数的加减乘除实现
#include "stdafx.h"#include<iostream>using namespace std;class Complex{private: double real; double imag;public: Complex()//构造函数 { real = 0; imag = 0; } Complex(double r, double i)...
2019-01-04 16:53:49 2662
原创 从键盘读入若干个字符串,对它们按字母大小进行排序,然后把排序好的字符串z送到磁盘文件中保存。
#include<stdio.h>#include<string.h>#include<stdlib.h>int main()//输入字符串,字符串排序 保存在文件中{ FILE *fp; char str[3][10], tmp[10]; int i, j, k, n = 3; printf("input strings:\n"); for ...
2018-12-15 17:20:12 1824
原创 n阶勒让德
n阶勒让德多项式#include<stdio.h>float dera(int n, float x);void main(){ int a = 4; float ret, b = 3; printf("input a,b:"); scanf("%d,%f\n",&a, &b); printf("n=%d...
2018-11-28 11:30:36 290
原创 C语言
有一篇短文,共有3行文字,每行有80个字符。想统计出其中英文大写字母,小写字母,数字,空格以及其他字符各有多少个。#include<stdio.h>#include<cstring>int main(){ char a[3][80]; char c; int i, j, up = 0, low =0, digit = 0, sp...
2018-11-24 16:49:05 94
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人