Next day All Programs

Source: Internet
Author: User

/*

{

int a,b,rst,c;

scanf ("%d,%d,%d", &a,&b,&c);

Switch (c)

{

Case 1:

rst=a+b;printf ("%d\n", rst);

Case 2:

rst=a-b;printf ("%d\n", rst);

Case 3:

rst=a*b;printf ("%d\n", rst);

Case 4:

rst=a/b;printf ("%d\n", rst);

Default:

printf ("Sorry, IQ is not enough \");

}

return 0;

}

*/

/*

{

int A, B;

printf ("A is the day of the week, B is the license plate tail number \ n");

scanf ("%d,%d", &a,&b);

Switch (a)

{Case 1:

Switch (b)

{Case 2:

Case 7:

printf ("Cannot travel \ n");

default:printf ("can travel \ n");

}

Break

Case 2:

Switch (b)

{

Case 3:

Case 8:

printf ("Cannot travel \ n");

default:printf ("can travel \ n");

}break;

Case 3:

Switch (b)

{

Case 4:

Case 9:

printf ("Cannot travel \ n");

default:printf ("can travel \ n");

}break;

Case 4:

Switch (b)

{

Case 5:

Case 0:

printf ("Cannot travel \ n");

default:printf ("can travel \ n");

}break;

Case 5:

Switch (b)

{

Case 1:

Case 6:

printf ("Cannot travel \ n");

default:printf ("can travel \ n");

}break;

Default:printf ("Unknown situation \ n");

}

}

*/

Homework

/*{

int A,b,c,max;

printf ("Please enter three integers, separated by a space:");

scanf ("%d%d%d", &a,&b,&c);

if (a>b) {

Max=a;

}

else{

Max=b;

}

if (max<c) {

Max=c;

}

printf ("Max:%d\n", Max);

}*/

Enter three numbers to find the maximum value

/*

Compare two letter Sizes

{

Char A, B;

printf ("Please enter two letters!") \ n ");

scanf ("%c,%c", &a,&b);

if (a>b)

printf ("%c\n", a);

Else (printf ("%c\n", b));

return 0;

}

*/

/*

{

int a,b,c,d,e,f,g,m;

printf ("Please enter the amount \ n");

scanf ("%d", &a);

b=a/100;

m=a%100;

C=M/50;

m=m%50;

D=M/20;

m=m%20;

E=M/10;

m=m%10;

F=M/5;

m=m%5;

G=M/1;

printf ("needs $100%d\n needs $50%d\n need $20%d\n need $10%d\n need $5%d\n need 1 Yuan%d\n", b,c,d,e,f,g);

return 0;

}

*/

/*

{

int a[6] = {6, 5, 1}, number=;

int money, I;

printf ("Please enter the amount \ n");

scanf ("%d", &money);

for (i = 0; i < number; i++) {

printf ("%d:%d\n", A[i], money/a[i]);

Money =money%a[i];

}

return 0;

}

Enter an amount to print out how many 100,50,20,10,5,1 yuan

*/

/*

{

int i;

int sum=0;

for (i=0;i<=100;i++) {

if (i%2==0) {

Sum+=i;

}

else{

Sum-=i;

}

}

printf ("%d\n", sum);

return 0;

}*/

/*

{

int i;

scanf ("%d", &a);

for (i=0;i<=10;i+=2)

{

printf ("Initial value =%d, square value =%d, cubic value =%d", i,i*i,i*i*i);

}

return 0;

}

*/

/*

{

int sum,i;

for (i=0;i<=100;i+=5)

{

printf ("sum=%d\n", sum+=i);

}

}

*/

/*

{

int i;

while (i<=100)

{

if (i%9==0)

{

printf ("%d\n", I);

}

i++;

}

}

*/

/*

Calculate sum and average after entering five numbers

{

int i=5,j,sum=0;

float avg=0;

while (i>0) {

scanf ("%d", &j);

Sum+=j;

i--;

}

AVG=SUM/5;

printf ("Sum:%d\n, Average:%f\n", sum,avg);

}

*/

/*{

int A;

printf ("Please enter results \ n");

scanf ("%d", &a);

Switch (A/10) {

Case 10:

printf ("Full mark \ n");

Break

Case 9:

printf ("Excellent \ n");

Case 8:

printf ("Good \ n");

Case 7:

printf ("General \ n");

Case 6:

printf ("Pass \ n");

default:printf ("Less than lattice \ n");

Break

}

}

*/

Next day All Programs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.