摘要:Assignment* -> Create a structre as follows struct Product { int productid; char productname[10]; float price; int quantity;}* product list is local t...
阅读全文
摘要:Home Assignment:- * Create a menu driven application where you will have 2 types of users to login in Admin and Student *写一个面板程序,要求用户可以Admin和Student两种...
阅读全文
摘要:gets函数和scanf函数都可以作为字符串的输入函数,相同点:都是将从键盘输入的字符串存入数组中,输入完成后要以回车来结束输入。不同点:利用sanf时,在输入过程中碰到空格时系统认为输入结束,并将空格之前的字符作为有效字符存入数组中,并在尾部追加\0作为结束标志。 利用gets时,空格...
阅读全文
摘要:#includevoid isPrime(int n);void main(){int x,n=10;while(n--) { //循环10次printf("Enter number:");scanf("%d",&x);isPrime(x);}}void isPrime(int n){ i...
阅读全文
摘要:#include#include#include //改变颜色需要void selectSort(int a[],int length);void main(){ HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE); //引入 int ...
阅读全文
摘要:#includevoid selectSort(int a[],int length);void main(){ int i; float start=0,finish=0; int a[10]={10,15,4,2,5,3,6,9,7,1}; printf("排序前:\...
阅读全文
摘要:#include#includevoid bubbleSort1(int a[],int length);void bubbleSort2(int a[],int length);void main(){ float start=0,finish=0; int a[10]={10,1...
阅读全文
摘要:#includevoid main(){ int a[5]={1,2,3,4,5},i; int *p; p=&a[0]; printf("指针加:\n"); for(i=0;i<5;i++) //addtion { printf("a[%d]...
阅读全文
摘要:#includevoid main(){char name[10];int i=0;printf("Enter your name:");scanf("%s",name);printf("Spell it:");while(name[i]!='\0'){ printf("%c ",name[i...
阅读全文
摘要:Pointers * Pointers are variables * Pointers store only address of the memory location. they do not store a value. * Pointers are declared like :- int...
阅读全文
摘要:#includevoid main (){ int x=0,y=0,z=0; int i,j,k; printf("Enter x,y,z:"); scanf("%d %d %d",&x,&y,&z); int a[x][y],b[y][z],c[x][z]; p...
阅读全文
摘要:#include#includeint x;//保存客户ID(index值)void login(); //登录void menu(); //菜单void deposit(); //存款void withdraw();//取款void check(); //查询void quit();...
阅读全文
摘要:class Assignment-2(use data types,constructs, switch, do while, functions, local variables) Create a Menu Driven Program for a simple bank operation:-...
阅读全文
摘要:#include #include void main(){ int x,i; char str[100]; //gets(st1); printf("Please input a string to find out whether the string is palind...
阅读全文
摘要:#includevoid main(){ int score[4]; int k; char subjects[4][10]={"English","maths","Science","Physics"}; int totalmarks=0; printf("Pleas...
阅读全文
摘要:#includevoid main(){ int id[10]; int n,k; int findid=-1 //表示没有找到 printf("please input the id:\n"); for(int i=0;i<10;i++) { ...
阅读全文
摘要:#includevoid main(){ int a[10]={3,5,6,33,6,78,1,65,42,23}; int min=0,max=0; for(int i=1;ia[max]) max=i; } printf("highest number is:%d,lowest number...
阅读全文