This file contains 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> | |
int main() | |
{ | |
printf("Hello, World!\n"); | |
return 0; | |
} |
This file contains 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> | |
const int inchInFeet = 12; | |
int main() | |
{ | |
using namespace std; | |
cout.setf(ios_base::fixed, ios_base::floatfield); | |
int inch; | |
cout << "Please input your hight in inches: "; |
This file contains 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> | |
int main() { | |
using namespace std; | |
cout.setf(ios_base::fixed, ios_base::floatfield); | |
int degree, minute, second; | |
cout << "Enter a latitude in degrees, minutes, and seconds:" << endl; | |
cout << "First, enter the degrees: "; |
This file contains 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> | |
const int hours_in_a_day = 24; | |
const int minutes_in_an_hour = 60; | |
const int seconds_in_a_minute = 60; | |
int main() | |
{ | |
using namespace std; | |
long second; | |
long remain; |
This file contains 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> | |
int main() | |
{ | |
using namespace std; | |
double mile; | |
double gallon; | |
cout << "Enter how many miles you have driven: "; |
This file contains 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> | |
double harmonic_mean(double x, double y); | |
int main() | |
{ | |
using namespace std; | |
double x, y; | |
cout << "Please input x and y: "; |
This file contains 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> | |
void inputScore(int * score_card, int score_size); | |
void displayScore(int * score_card, int score_size); | |
double getAverageScore(int * score_card, int score_size); | |
int main() | |
{ | |
using namespace std; | |
cout.setf(ios_base::fixed, ios_base::floatfield); |
This file contains 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> | |
struct box | |
{ | |
char maker[40]; | |
float height; | |
float width; | |
float length; | |
float volume; | |
}; |
This file contains 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> | |
long double probability(unsigned numbers, unsigned picks, unsigned mega); | |
int main() | |
{ | |
using namespace std; | |
// cout.setf(ios_base::fixed, ios_base::floatfield); | |
double total, choices, mega; |
This file contains 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> | |
long factorial(int n); | |
int main() | |
{ | |
using namespace std; | |
int n; | |
cout << "Please input a number(n): "; |
OlderNewer