beginner katas

This commit is contained in:
2019-11-09 23:51:57 +01:00
parent f492104b56
commit dc65b6b3da
3 changed files with 38 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
#include <vector>
class MaxRotate
{
public:
static long long maxRot(long long n);
static void getNums(long long input);
static long long getValueFromDigits(std::vector<int> &digits);
static void getNums(std::vector<int> &digits, long long input){
if (input > 9) {
getNums(digits, input / 10);
}
digits.push_back(input % 10);
}
static long long getValueFromDigits(std::vector<int> &digits){
for(auto &i : digits){
}
}
static long long maxRot(long long n){
}
};

View File

@@ -0,0 +1,3 @@
char *integrate(int coefficient, int exponent) {
return "Bart";
}

View File

@@ -20,6 +20,14 @@ int main(int argc, char** argv) {
printf("UINT_MAX : %u\n", (unsigned int) UINT_MAX); printf("UINT_MAX : %u\n", (unsigned int) UINT_MAX);
printf("ULONG_MAX : %lu\n", (unsigned long) ULONG_MAX); printf("ULONG_MAX : %lu\n", (unsigned long) ULONG_MAX);
printf("USHRT_MAX : %d\n", (unsigned short) USHRT_MAX); printf("USHRT_MAX : %d\n", (unsigned short) USHRT_MAX);
printf("Storage size for float : %d \n", sizeof(float));
printf("FLT_MAX : %g\n", (float) FLT_MAX);
printf("FLT_MIN : %g\n", (float) FLT_MIN);
printf("-FLT_MAX : %g\n", (float) -FLT_MAX);
printf("-FLT_MIN : %g\n", (float) -FLT_MIN);
printf("DBL_MAX : %g\n", (double) DBL_MAX);
printf("DBL_MIN : %g\n", (double) DBL_MIN);
printf("-DBL_MAX : %g\n", (double) -DBL_MAX);
printf("Precision value: %d\n", FLT_DIG );
return 0; return 0;
} }