单词练习模板

#include <bits/stdc++.h>
using namespace std;

// 你要背的单词
string u5[15][5] = 
{
	{"exchange", "交流"},
	{"nervous", "焦虑的"},
	{"grateful", "感激的"},
	{"chopstick", "筷子"},
	{"tour", "旅行"},
	{"tai_chi", "太极"},
	{"yet", "尚"},
	{"independent", "自主的"},
	{"content", "内容"},
	{"feeling", "感觉"}
};

int main()
{
	srand(time(0));
	
	while (1)
	{
		int i = rand() % 10;
		
		int j = rand() % 2;
		cout << u5[i][j] << ":";
		
		string ans;
		cin >> ans;
		if (ans == u5[i][!j])cout << "True\n\n";
		else{
			cout << "False\n\n";
			cout<<"True answer is "<<u5[i][!j]<<"\n\n";
		} 
	}
	return 0;
}

可重复练习

#include <bits/stdc++.h>
#include <windows.h>
using namespace std;

// 你要背的单词
string u5[105][5] = 
{
	{"exchange", "交流"},
	{"nervous", "担忧的"},
	{"grateful", "感激的"},
	{"chopstick", "筷子"},
	{"tour", "旅行"},
	{"tai_chi", "太极"},
	{"yet", "尚"},
	{"independent", "自主的"},
	{"content", "内容"},
	{"feeling", "感觉"},
	{"shock", "震惊"},
	{"foreign", "外国的"},
	{"confused", "糊涂的"},
	{"anxious", "忧虑的"},
	{"phase", "阶段"},
	{"honeymoon", "蜜月"},
	{"unfamiliar", "陌生的"},
	{"homesick", "想家的"},
	{"lonely", "孤独的"},
	{"deal", "应对"},
	{"expect", "期待"},
	{"situation", "情况"},
	{"accept", "支持"},
	{"adaptation", "适应"},
	{"", ""},
	{"", ""},
	{"", ""},
	{"", ""},
	{"", ""},
	{"", ""}
};

int MyRand(int a, int b)
{
	return rand() % (b - a + 1) + a;
}

int main()
{
	srand(time(0));
	
	short lsp, rsp;
	cout << "输出练习范围:";
	cin >> lsp >> rsp;
	--lsp; --rsp;
	cout << "练习范围:" << u5[lsp][0] << " ~ " << u5[rsp][0] << "\n";
	
	Sleep(1000); system("cls");
	
	queue <int> q;
	
	for (int i = lsp; i <= rsp; ++i)
	{
		q.push(i);
	}
	
	int at = 0, tt = 0;
	while (!q.empty())
	{
		int i = q.front();
		q.pop();
		
		int j = rand() % 2;
		cout << u5[i][j] << ":";
		
		string ans;
		cin >> ans;
		if (ans != u5[i][!j])
		{
			++tt;
			cout << "False\n";
			cout << "True answer is " << u5[i][!j] << "\n\n";
			q.push(i);
			Sleep(2500);
		}
		else cout << "True\n\n";
		
		Sleep(500);
		system("cls");
		++at;
	}
	int ACt = ((at - tt) * 1.0 / at) * 100;
	cout << "练习完成!正确率:" << ACt << " %\n";
	if (ACt <= 70)
	{
		cout << "你完了,等着重听吧";
		cout << R"(
+----------+
|
|
|---------+
|
|
|
|
		)";
	}
	else
	{
		cout << "太好了不用重听";
		cout << R"(
    	+
       / \
      /   \
     /     \
    /       \
   /         \
  /-----------\
 /             \
/               \ 
		)";
	}
	return 0;
}

85

string u5[105][5] = 
{
	{"exchange", "交流"},
	{"nervous", "担忧的"},
	{"grateful", "感激的"},
	{"chopstick", "筷子"},
	{"tour", "旅行"},
	{"tai_chi", "太极"},
	{"yet", "尚"},
	{"independent", "自主的"},
	{"content", "内容"},
	{"feeling", "感觉"},
	{"shock", "震惊"},
	{"foreign", "外国的"},
	{"confused", "糊涂的"},
	{"anxious", "忧虑的"},
	{"phase", "阶段"},
	{"honeymoon", "蜜月"},
	{"unfamiliar", "陌生的"},
	{"homesick", "想家的"},
	{"lonely", "孤独的"},
	{"deal", "应对"},
	{"expect", "期待"},
	{"situation", "情况"},
	{"accept", "支持"},
	{"adaptation", "适应"},
	{"", ""},
	{"", ""},
	{"", ""},
	{"", ""},
	{"", ""},
	{"", ""}
};

86

string u5[105][5] = 
{
	{"author", "作者"},
	{"remains", "遗迹"},
	{"locate", "把……安置在"},
	{"soldier", "士兵"},
	{"captain", "首领"},
	{"empty", "空的"},
	{"victory", "胜利"},
	{"joke", "笑话"},
	{"midnight", "午夜"},
	{"except", "除……之外"},
	{"hide", "藏"},
	{"secretly", "秘密的"},
	{"enter", "进入"},
	{"succeed", "成功"},
	{"trick", "诡计"},
	{"fight", "战斗"},
	{"beat", "打败"},
	{"pretend", "假装"},
	{"enemy", "敌人"},
	{"fail", "失败"},
	{"", ""},
	{"", ""},
	{"", ""},
	{"", ""},
	{"", ""},
	{"", ""},
	{"", ""},
	{"", ""},
	{"", ""},
	{"", ""},
	{"", ""},
	{"", ""},
};

1 条评论

  • @ 2025-11-15 16:03:30

    )了分02于小须必在现,分01于小须必前以(高升得制限数分团入,个这有要团和义年当,了用好太

    • @ 2025-11-17 20:07:15

      不建议像 Mod 学习这样说话

  • 1