Find Jobs
Hire Freelancers

C++ Recursion program

$10-20 USD

완료함
게시됨 7년 이상 전

$10-20 USD

제출할때 지불됩니다
Write individual C++ programs for each function. Implement all of these functions recursively. No loops allowed. No static Variables allowed. bool isPrefix( char target[] , char bigString[] ); // return true iff target is a prefix of bigString. No library functions allowed. // e.g. "abc" is a prefix of "abc" and "abcde" but not of "ab" or "aabc" or "acb" // Notes: isPrefix(w,w) and isPrefix("", w) are always true but isPrefix(y,"") is false unless y is "". // bigString and target are C-strings meaning null-terminated character arrays. bool equal(char s[], char t[]) ; // return true if C-strings s and t are equal int addOdd(int n); // return the sum of all odd numbers from 1 to n double twoToThe(int n); // return 2 to the power n including when n <= 0. int getMax(int nums[], int size); // return the maximum value in nums. int getIndexOfMax(int nums[], int size); // return the index of a maximum element of nums int findLastOccurence(int nums[], int size, int target); // return index of the last occurrence of target or -1 if target is not found. int findFirstOccurence(int nums[], int size, int target); // return index of the first occurrence of target or -1 if target is not found. void printDigits(unsigned int n); // print the digits of n separated by spaces. ie.g. 3415 --> 3 4 1 5. Assume n > 0 void drawLine(int n, char c); // output n occurrences of c on a line e.g. drawLine(4,'X') will output XXXX. void drawRuler(int n); // output a ruler pattern, e.g. drawRuler(4) will output the pattern below. (Call drawLine.) - -- - --- - -- - ---- - -- - --- - -- - string toBase16(unsigned int n); // return a string with the base 16 representation of n. Assume n>0. // 6-10 lines of code should be enough. string reverse(string s); // return a string with the same characters as s in reverse order, e.g. "abc" --> "cba" bool isPalindrome(int nums[], int size); // return true if the values in nums form a palindrome, e.g. {1,2,2,1} or {63,24,63}. bool isSorted(int nums[], int size); // return true if the values in nums are in ascending (or nondescending) order, e.g. {1,1,2,4} but not {1,1,4,2}. unsigned int intLog(unsigned int number, unsigned int base); // return biggest power of base that's <= number. // e.g. intLog(233, 3) is 4 since 3^4 = 81 but 3^5 is 243. // preconditions: base >= 2, number >= 1. int add(int m, int n); // return sum of m and n using ++ and -- operators ( Don't use + or - .) // Be sure to handle the cases where m and/or n is negative. // Hint: m + n = (m+1) + (n-1) = (m-1) + (n+1) int times(int m, int n); // return product of m and n using repeated addition. ( So don't use * .) // e.g. times(3,2) = 3 + times(3,1) = 3 + 3 + times(3,0) = 3 + 3 + 0 = 6 // If n < 0 then use the identity times(m,n) = -times(m,-n) unsigned int skipFactorial(unsigned int n); // n * (n-2) * (n-4) * .... * {1 or 2} and skipFactorial(0) = 1. void echo(); // The user enters a sequence of nonzero integers followed by 0. // The function then outputs the same integers in the original order, not including the 0. // Example: 43 23 88 6 55 0 --> 43 23 88 6 55 // No arrays, strings or other data structures allowed. void echoReverse(); // The user enters a sequence of nonzero integers followed by 0. // The function then outputs the same integers in the reverse order, not including the 0. // Example: 43 23 88 6 55 0 --> 55 6 88 23 43 // No arrays, strings or other data structures allowed.
프로젝트 ID: 12749617

프로젝트 정보

4 제안서
원격근무 프로젝트
활동 중 7년 전

돈을 좀 벌 생각이십니까?

프리랜서 입찰의 이점

예산 및 기간 설정
작업 결과에 대한 급여 수급
제안의 개요를 자세히 쓰세요
무료로 프로젝트에 신청하고 입찰할 수 있습니다
프로젝트를 수여된 사용자:
사용자 아바타
This looks nice and easy, I know exactly how to write each and every one of these functions already. Just let me at it and it will be done in no time :)
$15 USD 1일에
5.0 (3 건의 리뷰)
2.9
2.9
4 이 프로젝트에 프리랜서들의 평균 입찰은 $28 USD입니다.
사용자 아바타
Hello, I have more that 7 years of experience in Java and .Net. I can do this project. Let me know more about this job. Best regards.
$20 USD 1일에
5.0 (2 건의 리뷰)
0.0
0.0

고객에 대한 정보

국기 (UNITED STATES)
San Jose, United States
5.0
2
결제 수단 확인
11월 18, 2016부터 회원입니다

고객 확인

감사합니다! 무료 크레딧을 신청할 수 있는 링크를 이메일로 보내드렸습니다.
이메일을 보내는 동안 문제가 발생했습니다. 다시 시도해 주세요.
등록 사용자 전체 등록 건수(일자리)
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
미리 보기 화면을 준비 중...
위치 정보 관련 접근권이 허용되었습니다.
고객님의 로그인 세션이 만료되어, 자동으로 로그아웃 처리가 되었습니다. 다시 로그인하여 주십시오.