Home > Back-end >  To consolidate
To consolidate

Time:09-18

1, use to iterate over 500 in number, find is 3 is also a multiple of 7, output, 5 a newline
Within a 2100 number, format the even and odd number calculation

CodePudding user response:

This is not difficult.

CNT calculation number.

 if (num % 3==0 & amp; & Num % 7==0) {
cnt++;
Printf (" % d ", num);
If (CNT % 5==0)
printf("\n");
}

CodePudding user response:

Topic: class database creation and maintenance
Language and environment
Implementation language: SQL language,
Environmental requirements: SQL Server 2008 and above version,
Submission requirements:
Students need to first class number and name to create a folder (such as class number 1301, name is zhang SAN, the folder named 1301 _ zhang SAN), will be named after his name pinyin database files and named after his name pinyin SQL files stored in this folder, submit results must have a database file (MDF), log files (. LDF), and the SQL file (SQL), finally according to the requirements of the supervisor to submit after compression,
Identified as "manual implementation", only in SQL Server Management Studio to use the mouse operation way, the final submission database after the separation. And MDF file. LDF files,
Labeled "statements to realize", need to use the SQL statement to achieve function, save and submit. SQL file, a file can contain multiple statements, using annotated qid,
The functional requirements
Create the database, named after his name pinyin, for example: zhang SAN's classmate named database for "ZhangSan"
In the database of named after his name pinyin to create two tables (manual) :
Table 1: TXB (table)
The field name
Type
Description
Constraint

StuID
Char (6)
Student id
The primary key

The Name
Nchar (8)
Name
The only

Gender
Nchar (2)
Gender
Not empty

Age
Int
Age
Not empty

Nation,
Nchar (10)
National
The default "han"

DorID
Char (3)
Dormitory,
Foreign keys

Table 2: SSB (dormitory)
The field name
Type
Description
Constraint

DorID
Char (3)
Dormitory,
The primary key

Tel
Char (10)
Dormitory phone


To insert the following three record, SSB table (statement)
Dormitory, dormitory phone
101, 6331157,
102, 6331777,
202, 6331779,
To insert the following 5 records TXB - (statement)

Student id name gender age national dorm number
001101 is high side male 19 han 101
001102 Liu Honghua women 18 tujia 102
001103 hong-qi wang male 19 han 101
001301 women 18 lian-hua liu han 202
001302 Yang Hongxia women 17 tujia 202
Use SQL statements to complete the following functions (statement)
The SSB dormitory for 101 dormitory telephone number in the table to 6331158 (5)
Will increase 1 year old age of TXB table (5 points)
According to average age TXB table (5 points)
Displays information about the student student id as "001103" (5 points)
Display name xue-sheng liu all the information (10)
Display name of the second word is "red" student's name, age (10)
Information display name, age, and age were descending order (10)
Statistics of the number of girls and boys grouping [query] (10)
Query shows that: high party and his dormitory, dormitory telephone/join query (10)
Query, according to the dormitory, dormitory number, number of ascending/connection, grouping query (10 points)

CodePudding user response:

refer to the second floor lwy01251028 response:
title: class database creation and maintenance
Language and environment
Implementation language: SQL language,
Environmental requirements: SQL Server 2008 and above version,
Submission requirements:
Students need to first class number and name to create a folder (such as class number 1301, name is zhang SAN, the folder named 1301 _ zhang SAN), will be named after his name pinyin database files and named after his name pinyin SQL files stored in this folder, submit results must have a database file (MDF), log files (. LDF), and the SQL file (SQL), finally according to the requirements of the supervisor to submit after compression,
Identified as "manual implementation", only in SQL Server Management Studio to use the mouse operation way, the final submission database after the separation. MDF file and LDF files.
Labeled "statements to realize", need to use the SQL statement to achieve function, save and submit. SQL file, a file can contain multiple statements, using annotated qid,
The functional requirements
Create the database, named after his name pinyin, for example: zhang SAN's classmate named database for "ZhangSan"
In the database of named after his name pinyin to create two tables (manual) :

Didn't knot before you post, not others don't want to write at first sight, not to mention the code number of didn't write your own, can help you to change, but you don't write directly to all also won't have a few people will write
  • Related