零基础学虚幻4(UE4)·全系列 扫二维码继续学习 二维码时效为半小时

(4评价)
价格: 5998.00元

#include<iostream>
#include<vector>
#include<string>
using namespace std;
int main()
{
     //录入同学姓名和成绩,回车记录所有信息
    //然后开始查成绩
    string name = "phone";
    float score = 65.5f;

    vector<string>name_list;
    vector<float>score_list;
    cout << "请在一行种输入学生姓名与成绩并用空格隔开。\n例如:张三 100 李四 200.\n回车结束输入" << endl;
    while (cin >> name>>score)
    {
        name_list.push_back(name);
        score_list.push_back(score);
        if(cin.get()=='\n')//回车输入退出循环
        {
            break;
        }
    }
    cout << "输入姓名可查成绩" << endl;
    cin >> name;
    for (int i = 0; i < name_list.size(); ++i)
    {
        if(name ==name_list[i])
        {
            name = name_list[i];
            score = score_list[i];
            break;
        }    
    }
    cout << "学生 " << name << " 的成绩为 " << score << endl;
    system("pause");
    return 0;
}

[展开全文]
One胖man · 11-09 · 0

Vector  一种容器

 

int main() {

string name;

vector<string>name_list;

while(cin>>name){

    name_list.push_back(name);

}}

for(int i =0;i<name_list.size();++i) {

 cout<<name.list[i]<<endl;}

 

range for

[展开全文]
One胖man · 11-09 · 0

#include<iostream>
using namespace std;
int main()
{
    //200*112%   (200*112%-20)*112%
    float my = 200;//本金
    float ban = 0;//银行现有
    int year = 0;
    my = 200 * 1.12;
    ban = 200 * 1.12;
    while(true)
    {
        year++;    
        ban = (my - 20) * 1.12;
        my = ban - 20;
        cout << ban << endl;
        if(ban <0)
        {
            break;
        }        
    }
    cout << "花费 " << year << "年取完" << endl;
    system("pause");
    return 0;
}

[展开全文]
One胖man · 11-08 · 0

#include<iostream>
using namespace std;
#include<math.h>
int main()
{
    //64个棋盘 1 2 4 8 16 ....求一共多少
    //1 2 4 8 16
    //2
    //0 1 2 3 4        
    uint64_t num1 = 0, num2 = 0;
    for(int i =0;i<64;i++)
    {
        num1 = pow(2, i);        
        cout << num1 << endl;
        num2 = num1 + num2;//总数量
    }
    cout <<"一共需要米粒 " << num2 << endl;
    system("pause");
    return 0;
}

[展开全文]
One胖man · 11-08 · 0

#include<iostream>
using namespace std;
int main()
{
    int a = 0, min = 0, max = 0, in = 0;
    float sum = 0;
    char b = 'a';
    cout << "结束输入z z" << endl;
    while(b!='z')
    {
        cin >> a>>b;
        in++;        
        if(in==1)
        {
            min = a;
        }
        else if(a<min )
        {
            min = a;
        }

        if(max<a)
        {
            max = a;
        }
        
        sum = (sum + a)/in;
    }
    cout << "最大值为 " << max << endl;
    cout << "最小值为 " <<min << endl;
    cout << "平均值为 " << sum << endl;

    system("pause");
    return 0;
}

[展开全文]
One胖man · 11-08 · 0

#include<iostream>
using namespace std;
int main()
{
    int num = 0, sum = 1;
    cout << "请输入一个数" << endl;
    cin >> num;
    for(int i =1;i<=num;i++)
    {
        sum = i * sum;
    }
    cout << sum;


    system("pause");
    return 0;
}

[展开全文]
One胖man · 11-08 · 0

#include<iostream>
using namespace std;
int main()
{
    int a = 0, b = 0;
    cout << "请输入两个数字" << endl;
    cin >> a >> b;
    if(a>b)
    {
        for(b=b+1;b<a;b++)
        {
            cout << b << endl;
        }
    }
    else if(a<b)
    {
        for(a=a+1;a<b;a++)
        {
            cout << a << endl;
        }
    }
    else
    {
        cout << a << b << endl;
    }
    system("pause");
    return 0;
}

[展开全文]
One胖man · 11-08 · 0

#include<iostream>
using namespace std;
#include<string>;
int main()
{
    int q = 97;
    for(;q<123;q++)
    {
            cout << (char)q << endl;
    }    
    system("pause");
    return 0;
}

[展开全文]
One胖man · 11-08 · 0

#include<iostream>
using namespace std;
int main1() 
{
    int n;
    cout << "请输入一个数字" << endl;
    cin >> n;
    for(int i = 1; i <= n;i++)
    {
        cout << i<<endl;
    }


    system("pause");
    return 0;
}

[展开全文]
One胖man · 11-08 · 0

#include<iostream>
using namespace std;
int main()
{
    int num = 0;
    int temp = 0;
    int temp2 = 0;
    int temp3 = 0;
    cout << "请输入一个两位数" << endl;
    cin >> num;
    if (num < 100)
    {    
        temp = (num % 10 == 0 ? 0 : num % 10) * 10 + num / 10;            
        cout << num << " 翻转数为 " << temp << endl;
    }
    else 
    {
        temp2 = num / 100;
        temp2 = temp2 * 100;
        temp3 = num - temp2;
        temp = ((temp3 % 10 == 0 ? 0 : temp3 % 10) * 10 + temp3 / 10 )*10+ num / 100;
        cout << num << " 翻转数为 " << temp << endl;
    }
    system("pause");
    return 0;
}

[展开全文]
One胖man · 11-03 · 0

#include<iostream>
using namespace std;
int main()
{
    int num = 0;
    int temp = 0;
    cout << "请输入一个两位数" << endl;
    cin >> num;
    temp = (num % 10 == 0 ? 0: num % 10)*10+num/10;
    cout << num << " 翻转数为 " << temp << endl;

    system("pause");
    return 0;
}

[展开全文]
One胖man · 11-03 · 0

预处理  preprocess

编译 Compile

汇编 Assemble

链接 Link

[展开全文]
One胖man · 11-02 · 0

右键物体Transform-mirro镜像

[展开全文]
Boyfriend · 2023-02-18 · 0

设置中要打开允许分组的开关

[展开全文]
Boyfriend · 2023-02-18 · 0

SMB选中物体(BSP)所有的面

SAAWS选中所有相邻的面

[展开全文]
Boyfriend · 2023-02-18 · 0

按住shift移动鼠标 镜头跟随移动

[展开全文]
Boyfriend · 2023-02-18 · 0

大拇指指向X轴方向,食指指向Y轴方向中指指向Z轴的方向。

左手大拇指竖起来握住Z轴,其余手指由X转向Y如果大拇指方向和Z轴相同则为左手坐标系,否则为右手坐标系。

[展开全文]
Boyfriend · 2023-02-16 · 0

按住左键前后移动-推拉相机

按住中键左右移动-水平移动相机

按住中间按E-垂直提升相机,Q垂直下拉相机

按住左键按C放大,Z缩小

选中物体按ALT,移动鼠标

同时按住左右键相当于按中键

[展开全文]
Boyfriend · 2023-02-16 · 0