实验二part2.2

#include <stdio.h>
#include <stdlib.h>
int main() {
 int choice;
 printf("输入0~9以内的数字,选择屏幕背景色前景色方案: \n");
 printf("1-\t黑底绿色\n");
 printf("2-\t白底黑色\n");
 printf("3-\t蓝底白色\n");
 printf("其它-\t黑底白色(默认)\n");
 printf("\n请输入, 选择你想使用的屏幕配色方案:    ");
 scanf("%d",&choice);
   if (choice == 1) {
  system("color 02");
  printf("《黑客帝国》一类的影视剧常见这种屏幕色:)\n");
 }
  
 else if(choice == 2) {
  system("color f0");
  printf("大部分编辑器默认是这种配色:)\n"); 
 }
  
 else if(choice == 3) {
  system("color 1f");
  printf("这是机器蓝屏故障时的不讨喜色:)\n");
 }
  
 else {
  system("color 0f");
  printf("控制台程序默认小黑窗:)\n");  
 }
  
  
 printf("programming is fun, just try@_@\n");
 
 
 return 0;
}

猜你喜欢

转载自www.cnblogs.com/love-elaine/p/11769502.html
2.2