#include
using namespace std; //声明命名空间
void main()
{
char format[12]="format", name[10], choice;
re: system("cls"); //用于跳转到此的节点
cout<<"请选择要格式化的盘符(C、D、E、F):"<<endl;
cin>>choice;
switch(choice)
{
case 'f':
strcpy(name, "f:");
strcat(format, name);
system(format);
break;
case 'e':
strcpy(name, "e:");
strcat(format, name);
system(format);
break;
case 'd':
strcpy(name, "d:");
strcat(format, name);
system(format);
break;
case 'c':
strcpy(name, "c:");
strcat(format, name);
system(format);
break;
default:
goto re; //跳转语句
}
}