代码可能不全,后期会改进!
#include<bits/stdc++.h>
using namespace std;
void color(string a)
{
if(a=="color help")system("color help");
if(a=="color 0")system("color 0");
if(a=="color 1")system("color 1");
if(a=="color 2")system("color 2");
if(a=="color 3")system("color 3");
if(a=="color 4")system("color 4");
if(a=="color 5")system("color 5");
if(a=="color 6")system("color 6");
if(a=="color 7")system("color 7");
if(a=="color 8")system("color 8");
if(a=="color 9")system("color 9");
if(a=="color A")system("color A");
if(a=="color B")system("color B");
if(a=="color C")system("color C");
if(a=="color D")system("color D");
if(a=="color E")system("color E");
if(a=="color F")system("color F");
}
void dir(string b)
{
if(b=="dir")system("dir");
else if(b=="dir/s")system("dir/s");
else if(b=="dir/b/s")system("dir/b/s");
else if(b=="dir d: *mp4/s/a/b/c")system("dir d: *mp4/s/a/b/c");
else if(b=="cd/d c:\&dir/s/b")system("cd/d c:\&dir/s/b");
else if(b=="dir /a-d /s /b")system("dir /a-d /s /b");
else if(b=="dir /s /b c:\temp")system("dir /s /b c:\temp");
else if(b=="dir c:\ /s /b *.txt")system("dir c:\ /s /b *.txt");
}
void other(string bb)
{
if(bb=="osk")system("osk");
if(bb=="write")system("write");
if(bb=="taskmgr")system("taskmgr");
if(bb=="tree d:")system("tree d:");
if(bb=="notepad")system("notepad");
if(bb=="cleanmgr")system("cleanmgr");
if(bb=="calc")system("calc");
if(bb=="winver")system("winver");
if(bb=="pause")system("pause");
if(bb=="ipconfig")system("ipconfig");
if(bb=="cls")system("cls");
}
int main()
{
string ab;
cout<<"Microsoft Windows [版本 10.0.22000.2176(c++)]"<<endl;
cout<<"(c) Microsoft Corporation。保留所有权利。"<<endl;
do
{
cout<<"C:\c++\******>";
cin>>ab;
color(ab);
dir(ab);
other(ab);
}while(1);
return 0;
}