Skip to content

Commit 0c563ab

Browse files
committed
new file: ../../rainbowBomb/CMakeLists.txt
new file: ../../rainbowBomb/include/bomb.h new file: ../../rainbowBomb/src/bomb.c renamed: ../../rainbowBomb/main.c -> ../../rainbowBomb/src/main.c modified: ../CMakeLists.txt
1 parent e7d844c commit 0c563ab

File tree

5 files changed

+22
-10
lines changed

5 files changed

+22
-10
lines changed

c/rainbowBomb/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CMAKE_MINIMUM_REQUIRED(VERSION 2.9)
2+
PROJECT(RainbowBomb)
3+
INCLUDE_DIRECTORIES(include)
4+
AUX_SOURCE_DIRECTORY(src DIR_SRCS)
5+
ADD_EXECUTABLE(../bin/bin ${DIR_SRCS})
6+
7+

c/rainbowBomb/include/bomb.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#include <stdio.h>
2+
#include <stdbool.h>
3+
int bomb(int times , char Char);

c/rainbowBomb/src/bomb.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include "../include/bomb.h"
2+
int bomb(int times,char Char){
3+
printf("%c[47;31m",0x1B);
4+
while (times>0){
5+
putchar(Char);
6+
times--;
7+
}
8+
printf("%c[0m\n",0x1B);
9+
return 0;
10+
}
Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
#include <stdio.h>
2-
#include <stdbool.h>
3-
int bomb(int times,char Char){
4-
printf("%c[47;31m",0x1B);
5-
while (times>0){
6-
putchar(Char);
7-
times--;
8-
}
9-
printf("%c[0m\n",0x1B);
10-
}
1+
#include "../include/bomb.h"
112
int main(int argc,char *argv[]){
123
char Char;
134
if (1 == argc){

c/sqrt/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
CMAKE_MINIMUM_REQUIRED(VERSION 2.9)
12
PROJECT(test_math)
23
INCLUDE_DIRECTORIES(include)
34
AUX_SOURCE_DIRECTORY(src DIR_SRCS)

0 commit comments

Comments
 (0)