当前位置:网站首页>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 :



边栏推荐
- [noi simulation] computational geometry (convex hull, violence, and search set)
- PostgreSQL manually creates hikaridatasource to solve the error cannot commit when autocommit is enabled
- node:文件写入数据(readFile、writeFile),覆盖与增量两种模式
- Alibaba political commissar system - Chapter III, Alibaba political commissar and cultural docking
- 数字人民币时代隐私更安全
- Leetcode Hot 100 (brush question 9) (301/45/517/407/offer62/mst08.14/)
- 谷歌浏览器免跨域配置
- [opencv] - Operator (Sobel, canny, Laplacian) learning
- Nrf52832-qfaa Bluetooth wireless chip
- Markdown concise grammar manual
猜你喜欢

Security baseline of network security

TCP——滑动窗口

谷歌浏览器免跨域配置

Clion+opencv+aruco+cmake configuration

Four pin OLED display based on stm32

Second week of postgraduate freshman training: convolutional neural network foundation

Hal learning notes - Advanced timer of 7 timer

Proteus simulation based on msp430f2491

Deep learning (1): prediction of bank customer loss

Centos7/8 command line installation Oracle11g
随机推荐
Application of explosion-proof inclination sensor in safe operation of LNG
Alibaba political commissar system - Chapter III, Alibaba political commissar and cultural docking
ML.NET相关资源整理
Hal learning notes - Advanced timer of 7 timer
Google browser cross domain configuration free
[opencv] - Operator (Sobel, canny, Laplacian) learning
产品推广的渠道和策略,化妆品品牌推广方法及步骤
Centos7/8 command line installation Oracle11g
Simplefoc parameter adjustment 2- speed and position control
Clickhouse learning (I) Clickhouse?
【OpenCV】-算子(Sobel、Canny、Laplacian)学习
Clickhouse learning (II) Clickhouse stand-alone installation
What constitutes the smart charging pile system?
Cs5340 domestic alternative dp5340 multi bit audio a/d converter
Hc-sr04 use method and routine of ultrasonic ranging module (STM32)
Low cost 2.4GHz wireless transceiver chip -- ci24r1
Search and recall classic questions (eight queens)
centos7/8命令行安装Oracle11g
Simulation of four way responder based on 51 single chip microcomputer
Cs4344 domestic substitute for dp4344 192K dual channel 24 bit DA converter