Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Soul authored and Tony Soul committed Sep 7, 2016
1 parent f4bf2fe commit c2813c0
Show file tree
Hide file tree
Showing 9 changed files with 86 additions and 0 deletions.
Binary file modified .vscode/.BROWSE.VC.DB
Binary file not shown.
Binary file added .vscode/.BROWSE.VC.DB-shm
Binary file not shown.
Binary file added .vscode/.BROWSE.VC.DB-wal
Binary file not shown.
Binary file modified C Program/.vscode/.BROWSE.VC.DB
Binary file not shown.
Binary file removed C Program/.vscode/.BROWSE.VC.DB-wal
Binary file not shown.
23 changes: 23 additions & 0 deletions Modern C/celsius.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/********************************************
* Name: celsius.c *
* Purpost: Computer the dimensional weight. *
* Author: T.Soul *
* Date Written: 9/5/2016 *
*********************************************/

#include <stdio.h>

#define FREEZING_PT 32.0
#define SCALE_FACTOR (5.0/9.0)

int main()
{
float fahrenheit, celsius;
printf("Enter fahrenheit temperature: \n");
sacnf("%d", &fahrenheit);

celsius = (fahrenheit - FREEZING_PT) * SCALE_FACTOR;
printf("Celsius equivalent: %.1f\n", celsius);

return 0;
}
24 changes: 24 additions & 0 deletions Modern C/dweight.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/********************************************
* Name: dweight.c *
* Purpost: Computer the dimensional weight. *
* Author: T.Soul *
* Date Written: 9/5/2016 *
*********************************************/

#include <stdio.h>
int main()
{
int height, length, width, volumn, weight;

height = 8;
length = 12;
width = 10;
volumn = height * length * width;
weight = (volumn + 165) / 166;

printf("Dimensions: %dx%dx%d\n", length, width, height);
printf("Volumn (cubic inches): %d\n", volumnZ);
printf("dimensional weight (pounds): %d\n".weight);

return 0;
}
26 changes: 26 additions & 0 deletions Modern C/dweight2.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/********************************************
* Name: dweight2.c *
* Purpost: Computer the dimensional weight. *
* Author: T.Soul *
* Date Written: 9/5/2016 *
*********************************************/

#include <stdio.h>
int main()
{
int height, length, widthvolumn, weight;

printf("Enter height of box: ");
scanf("%d", &height);
printf("Enter length of box: ");
scanf("%d", &length);
printf("Enter width of box: ");
scanf("%d", &width);
volumn = height * length * width;
weight = (volumn + 165) / 166;

printf("Volumn (cubic inches): %d\n", volumn);
printf("Dimensional weight (pounds): %d\n", weight);

return 0;
}
13 changes: 13 additions & 0 deletions Modern C/pun.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/********************************************
* Name: pun.c *
* Purpost: Prints a ban pun. *
* Author: T.Soul *
* Date Written: 9/5/2016 *
*********************************************/

#include <stdio.h>
int main()
{
printf("To C, or not to C: that is the question.\n");
return 0;
}

0 comments on commit c2813c0

Please sign in to comment.