Add problem 4 solution
This commit is contained in:
parent
c65937127c
commit
86621232dc
7
include/p4.h
Normal file
7
include/p4.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef P4_H
|
||||
#define P4_H
|
||||
|
||||
int prompt_value(void);
|
||||
|
||||
#endif
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
#include "p1.h"
|
||||
#include "p2.h"
|
||||
#include "p3.h"
|
||||
#include "p4.h"
|
||||
#include "p5.h"
|
||||
|
||||
void print_int_arr(int* arr, int size) {
|
||||
@ -44,7 +45,12 @@ int main(void) {
|
||||
double sum_of_file = sum_file("input_p3.dat");
|
||||
|
||||
printf("Sum of file: %.2lf\n", sum_of_file);
|
||||
//
|
||||
|
||||
// Problem 4
|
||||
printf("Problem 4:\n");
|
||||
int p4_value = prompt_value();
|
||||
printf("You entered: %d\n", p4_value);
|
||||
|
||||
// Problem 5
|
||||
printf("Problem 5:\n");
|
||||
int num_alphanum = count_alphanumeric("Hello World!!");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user