This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author JD Durick | |
* @date 3/11/1998 | |
* Assignment: part of bigger program written to handle | |
merge sort and quick sort analysis | |
*/ | |
#include <stdio.h> //header file for input/output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
void update(int *a,int *b) { | |
int ans1, ans2; | |
ans1 = *a + *b; | |
ans2 = abs(*a-*b); //absolute via math.h | |
printf("%d\n%d", ans1, ans2); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
void rArray(int *, int); | |
int main() | |
{ | |
int num, *arr, i; | |
scanf("%d", &num); | |
arr = (int*) malloc(num * sizeof(int)); | |
for(i = 0; i < num; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* List.h | |
* | |
* Created on: Jul 20, 2020 | |
* Author: labgeek@gmail.com | |
*/ | |
#ifndef LIST_H_ | |
#define LIST_H_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* List.cpp | |
* | |
* Created on: Jul 20, 2020 | |
* Author: labgeek@gmail.com | |
*/ | |
#include <iostream> | |
#include <cstdlib> | |
#include "List.h"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
int main(){ | |
char *s; | |
s = malloc(1024 * sizeof(char)); | |
scanf("%[^\n]", s); | |
// printf("%s", s); | |
char *token = strtok(s, " "); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Sort number using STL vectors | |
*/ | |
#include <cmath> | |
#include <cstdio> | |
#include <vector> | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <array> | |
using namespace std; | |
bool sumOfTwo(int a[], int b[], int v, int len1, int len2) | |
{ | |
for(int i = 0; i<len1; i++) | |
{ | |
int needed_value = v - a[i]; | |
for(int j = 0; j<len2; j++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*****************************************************************//** | |
* \file hw6.c | |
* \brief Counts the number of words of a given length in maxRow sentences | |
* | |
* \author labgeek@gmail.com | |
* \date 4/10/1996 | |
*********************************************************************/ | |
#include <stdio.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstring> | |
using namespace std; | |
//function prototype | |
void solve(char[]); | |
int main() | |
{ | |
char name[100] = { 0 }; | |
char result; |
OlderNewer