aboutsummaryrefslogtreecommitdiffstats
path: root/csci5271/hw1/hw1p3.c
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2022-01-11 10:18:56 -0600
committerMatt Strapp <matt@mattstrapp.net>2022-01-11 10:18:56 -0600
commit6c9b79537f03115c5e2d4883fd407a6ac870bffd (patch)
treea26cecd37bb254795e8a847ca7235d5e7236ff54 /csci5271/hw1/hw1p3.c
parentfinish 3606 (diff)
downloadhomework-6c9b79537f03115c5e2d4883fd407a6ac870bffd.tar
homework-6c9b79537f03115c5e2d4883fd407a6ac870bffd.tar.gz
homework-6c9b79537f03115c5e2d4883fd407a6ac870bffd.tar.bz2
homework-6c9b79537f03115c5e2d4883fd407a6ac870bffd.tar.lz
homework-6c9b79537f03115c5e2d4883fd407a6ac870bffd.tar.xz
homework-6c9b79537f03115c5e2d4883fd407a6ac870bffd.tar.zst
homework-6c9b79537f03115c5e2d4883fd407a6ac870bffd.zip
Resume and rearrange
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to 'csci5271/hw1/hw1p3.c')
-rw-r--r--csci5271/hw1/hw1p3.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/csci5271/hw1/hw1p3.c b/csci5271/hw1/hw1p3.c
deleted file mode 100644
index 53ecc96..0000000
--- a/csci5271/hw1/hw1p3.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-void payment(char *name, double amount_cny, char *purpose, int purpose_len)
-{
- double amount_usd = amount_cny / 6.466;
- char memo[40];
- strcpy(memo, "Payment for: ");
- memcpy(memo + strlen(memo), purpose, purpose_len);
- //write_check(name, amount_usd, memo);
- printf("address of amount_usd: %p\naddress of memo: %p\n", &amount_usd, memo);
- printf("purpose_len: %d\n", purpose_len);
- printf("amount_usd: %f\npurpose: %s\n", amount_usd, purpose);
- return;
-}
-
-int main()
-{
- char name[] = "username";
- double amount_cny = 646.60;
- char purpose[] = "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41";
- int purpose_len = strlen(purpose);
- payment(name, amount_cny, purpose, purpose_len);
- return 0;
-} \ No newline at end of file