当前位置:网站首页>C language function output I love you
C language function output I love you
2022-07-29 08:25:00 【CPP programming】
C Language implementation output the following results , It is required to implement with function call .
***************
I love you!
**************
Their thinking : There is a line above and below the output text “*” Number , Obviously, there's no need to repeat this code , Use a function to output a line “*” The function of
int special_Symbols()// Custom function , The function is to output a line * Symbol
{
printf("*****************\n");
}
The second function outputs the middle of I love you that will do .
int text()// Custom function , The function is output I love you!\n
{
printf("I love you!\n");
}
Source code demo :
#include<stdio.h>// The header file
int main()// The main function
{
int special_Symbols();// Declare custom special_Symbols Method
int text();// Declare custom text Method
special_Symbols();// call special_Symbols Method
text();// call text Method
special_Symbols();// call special_Symbols Method
return 0;// The return value of the function is 0
}
int special_Symbols()// Custom function , The function is to output a line * Symbol
{
printf("*****************\n");
}
int text()// Custom function , The function is output I love you!\n
{
printf("I love you!\n");
}
The results of compiling and running are as follows :
*****************
I love you!
*****************
--------------------------------
Process exited after 1.794 seconds with return value 0
Please press any key to continue . . .
In custom functions special_Symbols and text The type of the specified function is void, Function has no type , That is, there is no function value , in other words , After these two functions are executed, no values will be brought back to main function .
Today's sharing is here , Everyone should study hard C Language /C++ yo ~
At the end : For preparing to learn C/C++ Programming partners , If you want to better improve your core programming skills ( Internal skill ) From now on !
C Language C++ Programming learning communication circle ,QQ Group :763855696【 Click to enter 】
C Language from entry to mastery (C Introduction to language C Language course C Language zero basis C Language foundation C Language learning C
Organize and share ( Years of learning source code 、 Project practice video 、 Project notes , Introduction to Basics )
Welcome to change careers and learn programming partners , Using more information to learn and grow faster than thinking about it yourself !
Programming learning video sharing :



边栏推荐
- Basic crawler actual combat case: obtaining game product data
- DC motor control system based on DAC0832
- Usage of torch.tensor.to
- Brief introduction and use of commonjs import and export and ES6 modules import and export
- Hal learning notes - Advanced timer of 7 timer
- Selenium actual combat case crawling JS encrypted data
- Detailed steps of installing MySQL 5.7 for windows
- The first week of postgraduate freshman training: deep learning and pytorch Foundation
- What constitutes the smart charging pile system?
- centos7/8命令行安装Oracle11g
猜你喜欢

Day6: use PHP to write file upload page

数仓分层设计及数据同步问题,,220728,,,,

Random lottery turntable wechat applet project source code

PostgreSQL手动创建HikariDataSource解决报错Cannot commit when autoCommit is enabled

Third week weekly report resnet+resnext

node:文件写入数据(readFile、writeFile),覆盖与增量两种模式

Unity shader learning (VI) achieving radar scanning effect

Selenium actual combat case crawling JS encrypted data

Inclination sensor is used for long-term monitoring of communication tower and high-voltage tower

Week 1 task deep learning and pytorch Foundation
随机推荐
Simple operation of SQL server data table
Flask reports an error runtimeerror: the session is unavailable because no secret key was set
Alibaba political commissar system - Chapter III, Alibaba political commissar and cultural docking
Simple calculator wechat applet project source code
Usage of torch.tensor.to
Cv520 domestic replacement of ci521 13.56MHz contactless reader chip
Multifunctional signal generator based on AD9850
Proteus simulation based on msp430f2491
[opencv] - Operator (Sobel, canny, Laplacian) learning
PostgreSQL manually creates hikaridatasource to solve the error cannot commit when autocommit is enabled
Application scheme of charging pile
用户身份标识与账号体系实践
Back up Google or other browser plug-ins
Preparation of SQL judgment statement
Component transfer participation lifecycle
BiSeNet v2
Clickhouse learning (III) table engine
Solve the problem of MSVC2017 compiler with yellow exclamation mark in kits component of QT
Cluster usage specification
ROS tutorial (Xavier)