当前位置:网站首页>【C Primer Plus第二章課後編程題】
【C Primer Plus第二章課後編程題】
2022-06-28 23:41:00 【禦膳房總試吃】
2.1
#include <stdio.h>
int main (void)
{
printf("Gustav Mahler\n");
printf("Gustav\n");
printf("Mahler\n");
printf("Gustav Mahler");
return 0;
}
//
// Created by Chen on 2022/6/26.
//
2.2
#include <stdio.h>
int main (void)
{
printf("Diago\n");
printf("China");
return 0;
}
//
// Created by Chen on 2022/6/26.
//
2.3
#include <stdio.h>
int main (void)
{
int year;
year=30;
printf("%d %d",year,year*365);
return 0;
}
//
// Created by Chen on 2022/6/26.
//
2.4
#include <stdio.h>
void jolly (void);
void deny (void);
int main (void)
{
jolly();
deny();
return 0;
}
void jolly (void)
{
printf("For he's a jolly good fellow!\n");
printf("For he's a jolly good fellow!\n");
printf("For he's a jolly good fellow!\n");
}
void deny (void)
{
printf("Which nobody can deny!");
}
//
// Created by Chen on 2022/6/26.
//
2.5
#include <stdio.h>
void br (void);
void ic (void);
int main (void)
{
br();
ic();
printf("India,China\n");
printf("Brazil,Russia");
return 0;
}
void br (void)
{
printf("Brazil,Russia,");
}
void ic (void)
{
printf("India,China\n");
}
//
// Created by Chen on 2022/6/26.
//
2.6
#include <stdio.h>
int main (void)
{
int toes;
toes=10;
printf("%d %d %d",toes,2*toes,toes*toes*toes);
return 0;
}
//
// Created by Chen on 2022/6/26.
//
2.7
#include <stdio.h>
void smile (void);
int main (void)
{
smile();
smile();
smile();
printf("\n");
smile();
smile();
printf("\n");
smile();
return 0;
}
void smile (void)
{
printf("Smile!");
}
//
// Created by Chen on 2022/6/26.
//
2.8
#include <stdio.h>
void one_three (void);
void two (void);
int main (void)
{
printf("starting now:\n");
one_three();
two();
printf("three\n");
printf("done!");
return 0;
}
void one_three (void)
{
printf("one\n");
}
void two (void)
{
printf("two\n");
}
//
// Created by Chen on 2022/6/26.
//
边栏推荐
- stm32F407-------LCD
- Stm32f407------- external interrupt
- Stm32f407 ------ running lamp and buzzer
- 【状态机设计】Moore、Mealy状态机、三段式、二段式、一段式状态机书写规范
- 机器学习6-决策树
- Be on the list again! Know that Chuangyu was selected as one of the top 50 competitive enterprises in China's network security industry in 2022
- ROS2中的行为树 BehaviorTree
- [matlab] function definition and use
- Quartz explanation and use
- 股票开户在网上开通安全吗?
猜你喜欢

Stm32f407 ------ running lamp and buzzer

Association line exploration, how to connect the two nodes of the flow chart

ctfshow XSS

Yyds dry goods inventory building knowledge map from scratch with neo4j (I)

Chapter III processor scheduling exercise

The second session of question swiping and clock out activity -- solving the switching problem with recursion as the background (2)

第三章 处理机调度练习

Finally, someone explained the cloud native architecture

华为22级专家十年心血终成云原生服务网格进阶实战文档,是真的6
![[stm32 HAL库] RTC和BKP驱动](/img/72/c2c46377d0a2a5a032802640ca0201.png)
[stm32 HAL库] RTC和BKP驱动
随机推荐
TDD case practice
Chapter III processor scheduling exercise
【状态机设计】Moore、Mealy状态机、三段式、二段式、一段式状态机书写规范
解决ConfigParser解析中文问题
ERROR 1067 (42000): Invalid default value for ‘end_time‘ Mysql
Insomnia last night
【狀態機設計】Moore、Mealy狀態機、三段式、二段式、一段式狀態機書寫規範
Oil monkey script learning
想问问,股票开账户如何优惠开户?网上开户安全么?
Ahai's advice
Is it difficult to register stocks and open accounts online? Is it safe to open an account online?
Stm32f407 ------ running lamp and buzzer
stm32F407-------串行(串口)通信
Junior, it's not easy!
Learning fuzzy from SQL injection to bypass the latest safe dog WAF
Machine learning 6-decision tree
油猴脚本学习
Stm32f407----- register address name mapping analysis
Counting sorting and stability of sorting
Huawei's level 22 experts have worked hard for ten years to complete the advanced practical document of cloud native service grid. 6