摘要:
#include <iostream> #include <cmath> using namespace std; int main() { int n,m; cin>>n>>m; int num[101]; for(int i=0;i<n;i++) cin>>num[i]; m = m%n; in 阅读全文
posted @ 2020-01-20 18:03
QRain
阅读(126)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <cmath> using namespace std; int main() { int n,count = 0,before = 2,w=0; cin>>n; for(int i=2;i<=n;i++) { w=0; for(int j= 阅读全文
posted @ 2020-01-20 17:29
QRain
阅读(106)
评论(0)
推荐(0)
摘要:
#include <iostream> using namespace std; int main() { int n,a=-1,b=-1,c=-1; cin>>n; if(n>0) { a=n%10; n=n/10; if(n>0) { b=n%10; n=n/10; } if(n>0) { c= 阅读全文
posted @ 2020-01-20 17:11
QRain
阅读(109)
评论(0)
推荐(0)
摘要:
memset(mark,-1,sizeof(mark));对每个输入的数,将它所包含的数标志置1,本身标志置0.最后输出所有标志为0的数。 #include <iostream> using namespace std; int main() { int k,flag=0; cin>>k; int 阅读全文
posted @ 2020-01-20 17:04
QRain
阅读(174)
评论(0)
推荐(0)
摘要:
结构体数组的定义和使用 struct STU { char sname[10]; char sno[10]; int grade; }; struct STU stu[101]; #include <iostream> using namespace std; struct STU { char s 阅读全文
posted @ 2020-01-20 12:08
QRain
阅读(145)
评论(0)
推荐(0)
摘要:
'\0' : 字符串结束标识符,也是空字符,ascii码为00 APAT-YES APAATA-NO,因为c为空字符,即字符串结束。 APAATAA-NO #include <iostream> using namespace std; int main() { int n,i; int sign 阅读全文
posted @ 2020-01-20 11:46
QRain
阅读(153)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <cstring> using namespace std; int main() { char num[101]; char out[11][10] = {"ling","yi","er","san","si","wu","liu","qi 阅读全文
posted @ 2020-01-20 10:12
QRain
阅读(100)
评论(0)
推荐(0)