Lv.1
签名:
在 官网的BUG 中回复
【大佬们求助下】
刚学c++看到cout << "hello,world";向输出流输入hello,world 因为深受Python影响,似乎真的很奇怪我只是想知道对象如何在屏幕上输出一些东西或者在不调用任何方法的情况下执行语句和函数之类的事情,后面才知道使用<<似乎调用了cout operator<<方法,那么cout<<"hello,world";是否可以写成
#include <iostream>
using namespace std;
int main() {
cout.operator<<("hello,world");
return 0;
}
//但是输出了一串数字,类似内存地址的东西0x402004
//why?不应该输出hello,world吗?2023-07-18T10:59:39 点赞:0
在 如何用C++做99乘法表? 中回复
#include <iostream>
using namespace std;
//打印乘法口诀表
int main() {
unsigned short int plus_num = 0;
for (int i = 1;i<=9;i++)
{ plus_num = 0;
for (int j = 1;j <= i;j++)
{
plus_num++;
printf("%d x %d = %d ",i,plus_num, i * plus_num);
}
printf("\n");
}
}
//凑凑热闹(doge)2023-07-18T13:22:49 点赞:0
在 C++每日一题 中回复
实际上可以用冒泡排序思想
这个比较简便,随手写的,错误请指出
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c,t;
cin >> a >> b >> c;
if(c>b)
{
t=b;
b=c;
c=t;
}
if(b>a)
{
t=a;
a=b;
b=t;
}
if(c>b)
{
t=b;
b=c;
c=t;
}
cout << a << b <<c;
return 0;
}
2023-07-24T22:42:04 点赞:0
在 Meteor Chat AI重磅来袭 中回复
人工智能 (AI)
人工智能利用计算机和机器模仿人类思维的问题解决和决策制定能力。
没想到阁下如此牛,竟然在图形化之地实现,实在令人钦佩
2023-09-24T13:11:46 点赞:0