Korrektur in Aufgabe1
This commit is contained in:
parent
5514c48754
commit
9df8f350f1
|
@ -13,14 +13,7 @@
|
||||||
*/
|
*/
|
||||||
// begin students to add code for task 4.1
|
// begin students to add code for task 4.1
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#define EOL 10
|
#include "read.h"
|
||||||
#define PARSE_ERROR -1
|
|
||||||
#define READ_ERROR -2
|
|
||||||
#define ASCII_SPACE 32
|
|
||||||
#define ASCII_DIGIT_0 48
|
|
||||||
#define ASCII_DIGIT_9 57
|
|
||||||
#define NO_POS -1
|
|
||||||
#define BUFFERSIZE 10
|
|
||||||
int getInt(int maxResult) {
|
int getInt(int maxResult) {
|
||||||
char buffer[BUFFERSIZE] = {0};
|
char buffer[BUFFERSIZE] = {0};
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
|
@ -12,5 +12,19 @@
|
||||||
* @brief Lab implementation
|
* @brief Lab implementation
|
||||||
*/
|
*/
|
||||||
// begin students to add code for task 4.1
|
// begin students to add code for task 4.1
|
||||||
|
#ifndef READ_H
|
||||||
|
#define READ_H
|
||||||
|
|
||||||
|
#define EOL 10
|
||||||
|
#define PARSE_ERROR -1
|
||||||
|
#define READ_ERROR -2
|
||||||
|
#define ASCII_SPACE 32
|
||||||
|
#define ASCII_DIGIT_0 48
|
||||||
|
#define ASCII_DIGIT_9 57
|
||||||
|
#define NO_POS -1
|
||||||
|
#define BUFFERSIZE 10
|
||||||
|
|
||||||
|
int getInt(int maxResult);
|
||||||
|
|
||||||
|
#endif
|
||||||
// end students to add code
|
// end students to add code
|
||||||
|
|
|
@ -12,5 +12,11 @@
|
||||||
* @brief Lab implementation
|
* @brief Lab implementation
|
||||||
*/
|
*/
|
||||||
// begin students to add code for task 4.1
|
// begin students to add code for task 4.1
|
||||||
|
#ifndef RECTANG_H
|
||||||
|
#define RECTANG_H
|
||||||
|
|
||||||
|
int Rectangular(int a, int b, int c);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
// end students to add code
|
// end students to add code
|
||||||
|
|
Loading…
Reference in New Issue