mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
remove stdint.h dependency
This commit is contained in:
parent
d5143ff07c
commit
66ef12de2c
@ -4,7 +4,7 @@
|
|||||||
long long int get_product(FILE *fp, long start_pos, int num_digits)
|
long long int get_product(FILE *fp, long start_pos, int num_digits)
|
||||||
{
|
{
|
||||||
char ch = ' '; /* temporary variable to store character read from file */
|
char ch = ' '; /* temporary variable to store character read from file */
|
||||||
uint8_t num = 0; /* temporary variable to store digit read */
|
unsigned char num = 0; /* temporary variable to store digit read */
|
||||||
long long int prod = 1; /* product accumulator */
|
long long int prod = 1; /* product accumulator */
|
||||||
int count = 0; /* we use this variable to count number of bytes of file read */
|
int count = 0; /* we use this variable to count number of bytes of file read */
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h> /* for memmove */
|
#include <string.h> /* for memmove */
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
@ -8,8 +7,8 @@ int main(int argc, char *argv[])
|
|||||||
int position = 0, num_bad_chars = 0;
|
int position = 0, num_bad_chars = 0;
|
||||||
int num_digits = 4;
|
int num_digits = 4;
|
||||||
char ch;
|
char ch;
|
||||||
uint8_t num, num_prev;
|
unsigned char num, num_prev;
|
||||||
uint8_t *buffer = NULL;
|
unsigned char *buffer = NULL;
|
||||||
long long int prod = 1, max_prod = 0;
|
long long int prod = 1, max_prod = 0;
|
||||||
|
|
||||||
/* if second command-line argument is given,
|
/* if second command-line argument is given,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user