05 2023 档案

摘要:#include<stdio.h>int main(){ int i=0;j=0;a[5],b[5],k=0,count=0,n=0; for(i=1;i<256;i++) { n=i*i; for(j=0,k=0;n!=0;j++,k++) { a[j]=n%10; n/=10; } for(j= 阅读全文
posted @ 2023-05-26 20:58 不会JAVA的小袁 阅读(19) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>int main(){ long number=0; long num=0,k,b=0; printf("以下是100000以内自守数:\n"); for(number=0;number<=100000;number++) { for(k=10,num=number 阅读全文
posted @ 2023-05-26 20:38 不会JAVA的小袁 阅读(17) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h>int main(){ int a, i, b, n; printf("There are following friendly - numbers pair smaller than 3000:\n"); for (a = 1; a < 3000; a++) { 阅读全文
posted @ 2023-05-26 20:30 不会JAVA的小袁 阅读(29) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>int main(){ int m,n; scanf("%d%d",&m,&n); int i,j; int sum=0; int flag=0; for(i=m;i<=n;i++) { sum=0; for(j=1;j<i;j++) if(i%j==0) sum+ 阅读全文
posted @ 2023-05-26 20:18 不会JAVA的小袁 阅读(34) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>int main(){ int z,i,j; for(i=0;i<16;i++){ for(j=0;j<24;j++){ for(z=0;z<46;z++){ if(3*i+2*j+z==50&&i+j+z==30){ printf("%d %d %d\n",i,j 阅读全文
posted @ 2023-05-26 20:08 不会JAVA的小袁 阅读(27) 评论(0) 推荐(0) 编辑
摘要:int main(){ double n=0,m; int i; for(i=0;i<64;i++) { m=A(i); n+=m; } printf("sum=%e\n",n); printf("volum=%e\n",n/(1.42e8)); return 0;}double A(int n){ 阅读全文
posted @ 2023-05-25 13:41 不会JAVA的小袁 阅读(11) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>int a[14];int main(){ int i,n,j=1; printf("The original order of cards is:"); for(i=1;i<=13;i++) { n=1; do{ if(j>13) j++; if(a[j]) j+ 阅读全文
posted @ 2023-05-25 13:35 不会JAVA的小袁 阅读(9) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>int main(){ int x=1,find=0; while(find==0) { if(x%2==1 && x%3==2 && x%5==4 && x%6==5 && x%7==0) { printf("x=%d\n",x); find=1; } x++; 阅读全文
posted @ 2023-05-25 13:25 不会JAVA的小袁 阅读(21) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>void main(){ int t,a[5]; long int k,i; for(i=95860;;i++) { for(t=0;k=100000;k>=10;t++) { a[t]=(i%k)/(k/10); k/=10; } if((a[0]==a[4])& 阅读全文
posted @ 2023-05-25 12:31 不会JAVA的小袁 阅读(19) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> int main(){ int sum = 0; int i = 0; int flag = 0; double tmp = 0; for(sum = 11; sum <= 1000; sum++) { tmp = (double)sum; for(i = 1; 阅读全文
posted @ 2023-05-24 13:57 不会JAVA的小袁 阅读(7) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>#include<windows.h> int main(){ int m = 0;//红球数量 int n = 0;//白球数量 int number = 0;//可能性的次数 printf(" 红球 白球 黑球\n"); printf("\n"); for (m 阅读全文
posted @ 2023-05-24 13:50 不会JAVA的小袁 阅读(23) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>int j = 0;int judge(int a[]){ for (int i = 1; i < 10; i++) { if (a[0]!=a[i]) { return 1; } } return 0;}void put(int a[]){ printf("第 % 阅读全文
posted @ 2023-05-24 13:42 不会JAVA的小袁 阅读(8) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>#include <cmath>using namespace std;int main(void){ int a1,a2,a3,a4,a5,n1,n2,n3,n4,n5; float maxm=0,tem; for (a5=0;a5<3;a5++) for(a 阅读全文
posted @ 2023-05-24 13:32 不会JAVA的小袁 阅读(13) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>#define TAXBASE 3500 typedef struct{ long start; long end; double taxrate;} TAXTABLE; TAXTABLE TaxTable[]={{0,1500,0.03},{1500,4500,0 阅读全文
posted @ 2023-05-24 13:19 不会JAVA的小袁 阅读(11) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<cmath>using namespace std;class Point{ private: double x; double y; double z; public: Point(double a,double b,double c):x(a 阅读全文
posted @ 2023-05-23 09:26 不会JAVA的小袁 阅读(10) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>using namespace std;class Horse{ public: Horse(){ cout<<"Horse 申请了空间..."<<endl; } virtual void Fly(){ cout<<"Just a horse."<<endl; } 阅读全文
posted @ 2023-05-23 09:08 不会JAVA的小袁 阅读(14) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>#include <iomanip>using namespace std;class Shape{ public: const double PI; Shape():PI(3.1415926){ } virtual double Area()=0;};clas 阅读全文
posted @ 2023-05-23 08:51 不会JAVA的小袁 阅读(19) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>int main(){ int i; int low=0; int high=N-1; int mid; int k=-1; int m; int a[N]={-3,4,7,13,45,67,89,100,180}; printf("数组中的数据如下: \n"); 阅读全文
posted @ 2023-05-22 12:03 不会JAVA的小袁 阅读(13) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>int main(){ int a[1000]; int i,j,n,t,k=0; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&a[i]); for(j=n-1;j>0;j--) for(i=0;i<j;i++) if( 阅读全文
posted @ 2023-05-22 11:51 不会JAVA的小袁 阅读(8) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>int main(){ float money=0.0; int i; for(i=1;i<=5;i++) { money=(1000+money)/(1+0.0063*12); } printf("存钱时应存入:%f\n",money); return 0;} 阅读全文
posted @ 2023-05-22 11:31 不会JAVA的小袁 阅读(20) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>#include<math.h>float fun(double a,double b,double c,double d){ float x0=2.0; float x; x=x0-((a*pow(x0,3)+b*pow(x0,2)+c*x+d)/(a*pow(x 阅读全文
posted @ 2023-05-22 11:27 不会JAVA的小袁 阅读(38) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>void main(){ long fib1=1,fib2=1; int i; for(i=1;i<=15;i++) { printf("%12d%12d",fib1,fib2); if(i%2==0) printf("\n"); fib1=fib1+fib2; f 阅读全文
posted @ 2023-05-22 11:15 不会JAVA的小袁 阅读(10) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>int main(){ int i,j,m,k; for(i=0;i<=9;i++) { for(j=0;j<=9;j++) { if(j!=i) { k=1000*i+100*i+10*j; for(m=3;m*m<=k;m++) { if(m*m==k) { p 阅读全文
posted @ 2023-05-22 11:07 不会JAVA的小袁 阅读(10) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>typedef struct date{ int year; int month; int day;}DATE;int countDay(DATE);int runYear(int);int main(){ DATE today; int totalday; int 阅读全文
posted @ 2023-05-20 20:44 不会JAVA的小袁 阅读(8) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>int main(){ int a; int b; int c; int count=0; for(a=1;a<=5;a++) { for(b=1;b<=5;b++) { for(c=1;c<=5;&&a!=b;c++) { if(c!=a&&c!=b) { cou 阅读全文
posted @ 2023-05-20 20:09 不会JAVA的小袁 阅读(12) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>int main(){ int a,b,c; for(a=0;a<=20;a++) for(b=0;b<=33;b++) for(c=3;c<=99;c++) if(a*5+b*3+c/3==100) if(a+b+c==100) if(c%3==0) printf 阅读全文
posted @ 2023-05-20 19:41 不会JAVA的小袁 阅读(6) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<cmath>#include<stdexcept>using namespace std;double area(double a,double b,double c) throw (invalid_argument){ if(a<=0||b<= 阅读全文
posted @ 2023-05-19 21:15 不会JAVA的小袁 阅读(3) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<string>using namespace std;class MyException{ public: MyException(const string &message):message(message){} ~MyException(){ 阅读全文
posted @ 2023-05-19 21:04 不会JAVA的小袁 阅读(13) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<algorithm>#include<functional>#include<vector>using namespace std;int main(){ int iarray[]={26,17,15,22,23,33,32,40}; vecto 阅读全文
posted @ 2023-05-19 20:52 不会JAVA的小袁 阅读(3) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<algorithm>#include<functional>#include<iterator>#include<vector>using namespace std;class evenByTwo{ private: int x; public 阅读全文
posted @ 2023-05-18 13:53 不会JAVA的小袁 阅读(6) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<algorithm>#include<functional>#include<vector>using namespace std;int main(){ int iarray[]={0,1,2,3,4,5,6,6,6,7,8}; vector< 阅读全文
posted @ 2023-05-18 13:12 不会JAVA的小袁 阅读(3) 评论(0) 推荐(0) 编辑
摘要:#include<fstream>#include<iostream>using namespace std;int main(int){ ifstream inf; inf.open("abc.txt"); ofstream outf; outf.open("abc_back.txt"); cha 阅读全文
posted @ 2023-05-17 20:19 不会JAVA的小袁 阅读(8) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>using namespace std;int main(){ int n; cout<<"Input n: "; cin>>n; cout<<"Dec: "<<dec<<n; cout<<" "<<"Oct: "<<oct<<n; cout<<" "<<"Hex 阅读全文
posted @ 2023-05-17 20:08 不会JAVA的小袁 阅读(7) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<fstream>using namespace std;class Dog{ public: int gdoga() { return a; } int gdogw() { return w; } void setdog(int x,int y) 阅读全文
posted @ 2023-05-17 19:59 不会JAVA的小袁 阅读(9) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>#include <iomanip>using namespace std;class matrix{private: int row,column; int **mat;public: matrix(const matrix& mx){ this->row=m 阅读全文
posted @ 2023-05-16 20:58 不会JAVA的小袁 阅读(16) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>using namespace std;class Time{ private: int hour; int minute; public: Time(int h=00,int m=00){ hour=h; minute=m; } int friend opera 阅读全文
posted @ 2023-05-16 09:26 不会JAVA的小袁 阅读(42) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>using namespace std;class FS{ private: int fz; int fm; public: FS() { fm=1; fz=0; } void set(int m,int z) { fm=m; fz=z; } void del() 阅读全文
posted @ 2023-05-16 09:15 不会JAVA的小袁 阅读(23) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<string>using namespace std;int main(){ string line; cout<<"Type a line terminated by 't'"<<endl; getline(cin,line,'t'); cou 阅读全文
posted @ 2023-05-15 11:57 不会JAVA的小袁 阅读(10) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<fstream>using namespace std;int main(){ ifstream file("integers",ios_base::in | ios_base::binary); if(file){ while (file){ 阅读全文
posted @ 2023-05-15 11:49 不会JAVA的小袁 阅读(9) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<sstream>#include<string>using namespace std;template<class T>inline T fromString(const string &str){ istringstream is(str); 阅读全文
posted @ 2023-05-15 11:41 不会JAVA的小袁 阅读(8) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<fstream>using namespace std;int main(){ int values[]={3,7,0,5,4}; ofstream os("integers",ios_base::out | ios_base::binary); 阅读全文
posted @ 2023-05-15 11:32 不会JAVA的小袁 阅读(12) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<fstream>#include<cstring>using namespace std;struct SalaryInfo{ unsigned id; double salary;};int main(){ SalaryInfo employe 阅读全文
posted @ 2023-05-15 11:21 不会JAVA的小袁 阅读(12) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>using namespace std;int main(){ char ch; while((ch=cin.get()) !=EOF) cout.put(ch); return 0;} 阅读全文
posted @ 2023-05-14 19:55 不会JAVA的小袁 阅读(10) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<iomanip>#include<string>using namespace std;template<class T>inline string toString(const T &v){ ostringstream os; os<<v; r 阅读全文
posted @ 2023-05-14 19:52 不会JAVA的小袁 阅读(7) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<iomanip>#include<string>using namespace std;int main(){ double values[]={1.23,35.36,653.7,4358.24}; string names[]={"Zoot", 阅读全文
posted @ 2023-05-14 19:45 不会JAVA的小袁 阅读(9) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<iomanip>#include<string>using namespace std;int main(){ double values[]={1.23,35.36,653.7,4358.24}; string names[]={"Zoot", 阅读全文
posted @ 2023-05-14 19:39 不会JAVA的小袁 阅读(11) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>using namespace std;int main(){ double values[]={1.23,35.56,653.7,4358.24}; for(int i=0;i<4;i++){ cout.width(10); cout<<values[i]<<e 阅读全文
posted @ 2023-05-14 19:30 不会JAVA的小袁 阅读(7) 评论(0) 推荐(0) 编辑
摘要:#include<algorithm>#include<iterator>#include<vector>#include<iostream>using namespace std;template<class InputIt,class OutputIt>void mySort(InputIt f 阅读全文
posted @ 2023-05-14 19:22 不会JAVA的小袁 阅读(7) 评论(0) 推荐(0) 编辑
摘要:#include<iterator>#include<algorithm>#include<functional>#include<iostream>using namespace std;template<class T>class IncrementIterator: public iterat 阅读全文
posted @ 2023-05-12 21:39 不会JAVA的小袁 阅读(6) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<numeric>#include<functional>#include<vector>using namespace std;int main(){ int iarray[]={1,2,3,4,5}; vector<int>ivector(ia 阅读全文
posted @ 2023-05-12 21:06 不会JAVA的小袁 阅读(2) 评论(0) 推荐(0) 编辑
摘要:#include<functional>#include<iostream>#include<vector>#include<algorithm>using namespace std;using namespace placeholders;int main(){ int intArr[]={30 阅读全文
posted @ 2023-05-12 20:48 不会JAVA的小袁 阅读(3) 评论(0) 推荐(0) 编辑
摘要:#include<functional>#include<iostream>#include<vector>#include<algorithm>using namespace std;int main(){ int intArr[]={30,90,10,40,70,50,20,80}; const 阅读全文
posted @ 2023-05-11 13:47 不会JAVA的小袁 阅读(10) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<numeric> #include<functional> using namespace std; int main() { int a[]={1,2,3,4,5}; const int N=sizeof(a)/sizeof(int); co 阅读全文
posted @ 2023-05-11 13:30 不会JAVA的小袁 阅读(8) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<numeric>using namespace std;class MultClass{ public: int operator() (int x,int y) const{return x*y;}};int main(){ int a[]={ 阅读全文
posted @ 2023-05-11 13:26 不会JAVA的小袁 阅读(12) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<numeric>using namespace std;int mult(int x,int y) {return x*y;};int main(){ int a[]={1,2,3,4,5}; const int N=sizeof(a)/size 阅读全文
posted @ 2023-05-11 13:19 不会JAVA的小袁 阅读(9) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<map>#include<utility>#include<string>using namespace std;int main(){ multimap<string,string>courses; typedef multimap<strin 阅读全文
posted @ 2023-05-10 15:38 不会JAVA的小袁 阅读(3) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<map>#include<cctype>using namespace std;int main(){ map<char,int>s; char c; do{ cin>>c; if(isalpha(c)){ c=tolower(c); s[c]+ 阅读全文
posted @ 2023-05-10 14:59 不会JAVA的小袁 阅读(4) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<vector>#include<set>#include<algorithm>#include<iterator> using namespace std; int main(){ /*set<int>A; set<int>B; set<int> 阅读全文
posted @ 2023-05-09 19:55 不会JAVA的小袁 阅读(12) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<list>#include<string>#include<numeric>#include<iterator>#include<vector>#include<functional>#include<algorithm>using namesp 阅读全文
posted @ 2023-05-09 19:47 不会JAVA的小袁 阅读(10) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<string>#include<vector>using namespace std;string word (const vector&arr{}int main(){ string a[100]; int i=0; int count=0; 阅读全文
posted @ 2023-05-09 09:21 不会JAVA的小袁 阅读(25) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<map>#include<string>#include<utility>using namespace std;int main(){ map<string, int>courses; courses.insert(make_pair("CSA 阅读全文
posted @ 2023-05-05 20:24 不会JAVA的小袁 阅读(15) 评论(0) 推荐(0) 编辑
摘要:#include<set>#include<iterator>#include<utility>#include<iostream>using namespace std;int main(){ set<double>s; while(true){ double v; cin>>v; if(v==0 阅读全文
posted @ 2023-05-05 20:08 不会JAVA的小袁 阅读(11) 评论(0) 推荐(0) 编辑
摘要:#include<queue>#include<iostream>#include<cstdlib>#include<ctime>using namespace std;const int SPLIT_TIME_MIN=500;const int SPLIT_TIME_MAX=2000;class 阅读全文
posted @ 2023-05-05 19:46 不会JAVA的小袁 阅读(15) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>using namespace std;template<class T>void mySwap(T&x,T&y){ T temp=x; x=y; y=temp;}template<class T>void bubblesort(T a[],int n){ int 阅读全文
posted @ 2023-05-04 21:01 不会JAVA的小袁 阅读(12) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<cassert>using namespace std;template<typename T>class OrderList{ public: typedef struct _NODE{ T value; struct _NODE* next; 阅读全文
posted @ 2023-05-04 20:36 不会JAVA的小袁 阅读(10) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示