本文主要是介绍A完题,运行一下,瞬间清爽多了,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
憋题没憋出来的副产品,很简单,但还算比较使用的小程序;#include <stdio.h>
#include <stdlib.h>
#include <string.h>int main()
{
char a[100],b[100];
int ok=0;
printf("Please input question number: ");
scanf("%s",b);
printf("Remove start!\n");
strcpy(a,b);
if(remove(strcat(a,".dsp"))){ printf("-Error,Remove %s Failed!\n",a);ok++;}
else printf("Remove %s successed!\n",a);
strcpy(a,b);
if(remove(strcat(a,".dsw"))){ printf("-Error,Remove %s Failed!\n",a);ok++;}
else printf("Remove %s successed!\n",a);
strcpy(a,b);
if(remove(strcat(a,".ncb"))){ printf("-Error,Remove %s Failed!\n",a);ok++;}
else printf("Remove %s successed!\n",a);
strcpy(a,b);
if(remove(strcat(a,".opt"))){ printf("-Error,Remove %s Failed!\n",a);ok++;}
else printf("Remove %s successed!\n",a);
strcpy(a,b);
if(remove(strcat(a,".plg"))){ printf("-Error,Remove %s Failed!\n",a);ok++;}
else printf("Remove %s successed!\n",a);char c[100]={"Debug\\\\"};
strcat(c,b);
strcpy(b,c);
strcpy(a,b);
if(remove(strcat(a,".exe"))){ printf("-Error,Remove %s Failed!\n",a);ok++;}
else printf("Remove %s successed!\n",a);
strcpy(a,b);
if(remove(strcat(a,".ilk"))){ printf("-Error,Remove %s Failed!\n",a);ok++;}
else printf("Remove %s successed!\n",a);
strcpy(a,b);
if(remove(strcat(a,".obj"))){ printf("-Error,Remove %s Failed!\n",a);ok++;}
else printf("Remove %s successed!\n",a);
strcpy(a,b);
if(remove(strcat(a,".pch"))){ printf("-Error,Remove %s Failed!\n",a);ok++;}
else printf("Remove %s successed!\n",a);
strcpy(a,b);
if(remove(strcat(a,".pdb"))){ printf("-Error,Remove %s Failed!\n",a);ok++;}
else printf("Remove %s successed!\n",a);if(!ok) printf("\nAll remove success!\n");
else printf("\nSorry, %d problems lead to remove failed!\n\n",ok);
system("pause");return 0;
}
这篇关于A完题,运行一下,瞬间清爽多了的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!