Java programming Chapter 1 programming exercises and java programming exercises
2.1
public class test { public static void main(String[] args) { Scanner input = new Scanner(System.in); double f, c; c = input.nextDouble(); f = (9.0/5)*c+32; System.out.println(f); }}
2.2
public class test { public static void main(String[] args) { double r, h; final do
String exercises, Interview Questions (article 1), and exercises
Question 1: WERTYU (Competition basics)
When you place your hand on the keyboard, you will be right and wrong when you do not pay attention to it. In this case, Q will change to W, J will change to K, and so on. Enter a wrong string and output the sentence that the typist intended to print.
Sample input: o s, gomr ypfsu/
Sample output: I AM FI
Experience in exercises 1.16-1.19 and exercises 1.16-1.19
First of all, I think that I made a serious mistake when I was doing 1.14 yesterday, and my mind was fixed, which led to a lot of useless work.
The key of 1.14 is to think of two physical meanings. One is breadth first, that is, only the first layer of child numbers of the recursive tree. There must be a formula.
F (n, m) = F (n-c1, m) +... + F (n-cm
Exercises on Codility (12) and exercises on codility 12
(1) MinMaxDivision
Given a non-negative integer array, each integer is [0 .. m], you want to divide it into K segments (cut K-1 knife), the segment can be empty, each element must belong to a segment, each segment must contain 0 or more continuous elements. The sum of the best and maximum segments is required to be as small as possible, and the smalles
(How did you learn sorting ?) Sort special exercises: Your sort exercises
1. When the sorting records are sorted from small to large or from large to small, the execution time of the quick sorting is the least ()
A. Pair
B. Error
Answer: B
According to the characteristics of quick sorting, quick sorting is the most efficient and the most efficient in the case of basic order.
2. The worst time complexity
9.11 first 9 exercises, 9.119 exercises
1. print
(1) print the first sentence ....
1 print " Hello World! "
Note the use of "" And''
1 print "I'm paul" # For 2 3 print 'I am paul' # the error is changed to 'I \'m paul'
And the use of "And '''
1 print """2 3 Hello World!4 5 Hello World!6 7 Hello World!8 9 """
(2) comma
print "hello world ",'abc'print "i am paul "
Result:
Hello world abc
I am paul
print
display any:such as: Dear and amiable xxx, favorite in XXX place dry xxxName = input (' Please enter name: ')where = input (' Please enter location: ')Love = input (' Please enter hobby: ')Print ("Dear and amiable%s, most like the%s local dry%s"% (Name,where,love))28. Make random verification code, case-insensitive.Process:-User Execution Program-Show the user the verification code that needs to be entered-Values entered by the userThe user enters the value and displays the correct information
Html exercises (5) and html exercises
This exercise shows the positioning and relative positioning of data;
Here is the positioning of html:
1. static positioning
This is the default method. For static, left and right do not take effect.
2. relative positioning (relative positioning)
The element frame deviates from the position of its stream (positioned by left and top). The element remains in the shape be
4927 line segment tree exercises 5, line segment tree exercisesTime Limit: 1 s space limit: 128000 KB title level: GoldQuestionView running resultsDescriptionDescription
There are n numbers and 5 Operations
Add a B c: Increase the number of all numbers in the range [a, B] to c.
Set a B c: set all numbers in the range [a, B] to c.
Sum a B: The sum of the query interval [a, B]
Max a B: maximum value of the query interval [a, B]
Min a B: the minimum valu
Several Simple jquery knowledge point exercises and jquery knowledge point exercisesIii. jquery object and dom object Iv. jquery object operation elements 7. Basic filter selector 1. first, select the first element. $ ("Div: first") Select the first Average score99Case: pentagram rating
String exercises and interview questions (Part 2) and exercises (Part 2)
Link 1:Explanation of string exercises and interview questions (Article 1)
6 questions: reply string (basic questions of the Competition)
Enter a string to obtain its longest echo substring. The meaning of a substring is a string segment that appears continuously in the original string. T
"Interesting integer" exercises, Interview Questions (Article 2), and exercises (Article 2)
Link 1: "interesting integer" exercises and interview questions (Article 1)
6 questions: number of replies
When a multi-digit reads by bit, the result is the same whether it is read from left to right or from right to left. For example, 11, 22, 101, etc. Write a program t
C primer plus (version 5) programming exercises-Chapter 8 programming exercises, primerplus
1. design a program to count the number of characters from the input to the end of the file.
# Include
2. Write a program and read the input as a forward stream until an EOF is encountered. This program prints each input character and its ASCII decimal value. Note that the characters before the space characters i
Canvas exercises _ Zuma game 01 and canvas exercises Zuma 01
I learned a Demo of Zuma game over the past few days and recorded the compilation process of this game.
1: first, implement a simple interface effect.
2: After drawing, let the black ball move along the circular arc.
Encoding Process
Create a canvas and draw a circular arc.
First, define a Canvas tag on the Html page.
2: create a dynamic ball. S
String exercises, C language string exercises
Your program needs to read a line of text, separated by spaces as several words, ended. You need to output the length of each word in this line of text. The words here are irrelevant to the language and can contain various symbols. For example, "it's" is a word with a length of 4. Note that consecutive spaces may appear in the row.
Input Format:
Enter a line of
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.