update C
snipplets
This commit is contained in:
11
code/C/Transform/rgbToHex.c
Normal file
11
code/C/Transform/rgbToHex.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char const *argv[]) {
|
||||
int red = 0;
|
||||
int green = 128;
|
||||
int blue = 64;
|
||||
|
||||
printf("#%.2x%.2x%.2x\n", red, green, blue); // #008040
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user