Tạo bởi Trắc Nghiệm Việt|
[Share Code] Tìm hiểu function trong C - Lập trình C
Lập Trình C
[Share Code] Tìm hiểu function trong C - Lập trình C
#Func.dev
[Project]
FileName=Func.dev
Name=Func
Type=1
Ver=2
ObjFiles=
Includes=
Libs=
PrivateResource=
ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=
Linker=
IsCpp=0
Icon=
ExeOutput=
ObjectOutput=
LogOutput=
LogOutputEnabled=0
OverrideOutput=0
OverrideOutputName=
HostApplication=
UseCustomMakefile=0
CustomMakefile=
CommandLine=
Folders=
IncludeVersionInfo=0
SupportXPThemes=0
CompilerSet=0
CompilerSettings=0000000000000000000000000
[VersionInfo]
Major=1
Minor=0
Release=0
Build=0
LanguageID=1033
CharsetID=1252
CompanyName=
FileVersion=
FileDescription=Developed using the Dev-C++ IDE
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=
AutoIncBuildNr=0
SyncProduct=1
#test1.c
#include <stdio.h>
#include <stdlib.h>
void showMessage() {
printf("\nHello A");
printf("\nHello B");
printf("\nHello C");
}
void tinhtong(int first, int last) {
int i, tong = 0;
for(i=first;i<=last;i++) {
tong+= i;
}
printf("\ntong = %d", tong );
}
int tinhtong2(int first, int last) {
int i, tong = 0;
for(i=first;i<=last;i++) {
tong+= i;
}
printf("\ntong = %d", tong );
return tong;
}
#test1.h
void showMessage();
void tinhtong(int first, int last);
int tinhtong2(int first, int last);