1. Enter the English characters, if it is uppercase characters, please output: "you enter uppercase characters,", if it is a small
Write characters, please output: "you input lowercase characters,",
2. One day someone began to "fishing for three days, two days of drying network", ask the person is in after n days fishing or the net
3. The standard price of a hotel room for 398/day, price float according to the tourist season and the team size: in peak season (July through September) more than twenty rooms (including 20) team discount 30% 15% less than 20 teams are favorable in the off-season, more than 20 rooms (including 20) team preferential discount 30% between 50% less than 20 program, input in and reservation number, output the total daily rate
Pray god help programming with C language
CodePudding user response:
This topic pupils will beCodePudding user response:
Baidu search relevant keywords,Code function at the end of the day is not others to help you see or interpretation or comment; But by myself calm down and take a long enough time and energy to do it yourself step or set a breakpoint or step to perform to a certain intermediate result shows or written to the log file analysis step by step,
Remind: cow x teacher cannot replace the student understand and use the toilet!
Single step debugging and set breakpoint debugging (VS IDE compilation connection through later, press F10 or F11 key step, press Shift + F11 exit the current function; In a press F9 set breakpoints after press F5 execution stops at the breakpoint,) is one of the programmers must master the skills,
CodePudding user response:
The first topic is a basic subject, it is recommended that the individual tries, according to the example of the book can make a change to these questions and the difficulty, can only say that programming language class didn't go for it,CodePudding user response:
The next day is not input a number, and then to draw more than 5? Remainder is less than or equal to 3 is in fishing, or more than 3 is in the netThe third question, also is the foundation, the switch case
CodePudding user response:
Naked lazyCodePudding user response:
Are all very basic problem, please have a look his bookCodePudding user response:
This is too simple, not worthy of the great godCodePudding user response:
This is very simple, you look at yourself,,CodePudding user response:
Printf (" please input a character ");Char ch=getchar ();
If ((ch>=65) & amp; & (ch<=90))
{
Printf (" you enter a capital letter ");
}
Else if ((ch>=92) & amp; & (ch<=122))
{
Printf (" you have entered a lowercase letter ");
}
The else
{
Printf (" you have entered a letter ");
}
system("pause");
return 0;
CodePudding user response:
The scanf (" % d ", & amp; N);If (n % 5
Printf
The else
Printf
The very basic things
CodePudding user response:
The first topic as if it is not hard to, later can'tCodePudding user response:
The first question can use ctype. J h, this is the character library functionchar ch;
Ch=getchar ();
Isupper (ch)//if it is a capital letter
Printf (" you enter uppercase characters, ");
Islower (ch)
Printf (" you input lowercase characters, ");
The other way, using the ASCII, branches can use an if... Else, more recommended use conditional operator? (expression) : (expression)
Branch can also switch
Personally, I think not because the topic simple refused to answer, and to say the somebody else not serious study, but the original poster is suspected lazy, the original poster to seriously learn, think more, more computer,
CodePudding user response:
I think these questions I read slowly study can makeCodePudding user response:
1, https://blog.csdn.net/qq_35882931/article/details/52247176Second question, m=n % 5, if m<3, fishing, else the net,
3, in m, reserve a room for n,
If m between 7-9, if n>=20, r=n * 398 * (1-30%), if n<20, r=n * 398 * (1-15%).
If m is not between 7-9, if n>=20, r=n * 398 * (1-50%), if n<20, r=n * 398 * (1-30%).
CodePudding user response:
1. Compare the ASCII code, it is uppercase or lowercase, and then output2. To take more than 5, 1, 2, 3, a fishing 4, 0, the net
3. The two variables a, b; A judge in fall in which range, as a condition of big; B number of judgment on which range, as a condition of the child; Combined with breaks, finally calculated the price
CodePudding user response:
Clearly is lazy, don't do so simpleCodePudding user response:
Baidu has the answer directly,,,,CodePudding user response:
I am also just started, these problems your best move with my left hand, look for to seek for their sense of algorithmCodePudding user response:
#includeInt main ()
{
Printf (" please input a character ");
Char ch=getchar ();
If ((ch>=65) & amp; & (ch<=90))
{
Printf (" you enter a capital letter ");
}
Else if ((ch>=92) & amp; & (ch<=122))
{
Printf (" you have entered a lowercase letter ");
}
The else
{
Printf (" you have entered a letter ");
}
return 0;
}
CodePudding user response:
Leg discounts, carried away, the next oneCodePudding user response:
From this, focused and ready to looking back: the original so simple ~ ~ ~ ~CodePudding user response:
Just the time to panic
CodePudding user response:
IF conditional sentence,CodePudding user response:
Check information to write the topic suggested the building themselves to think, basic training in college are you solve the problem of thinking ability, this is very helpful to go after this line,CodePudding user response:
Quite often encounters to do homework,Where you can make your own, do not ask where, instead of directly out of the topic,,,