blob: 86d2a339c2af5a22c9751fbfd12e07a55fadf270 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include <cs50.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
FILE *file = fopen("phonebook.csv", "a");
string name = get_string("Name: ");
string number = get_string("Number: ");
fprintf(file, "%s,%s\n", name, number);
fclose(file);
}
|