CS604P_Assignment_01
CS604P_Assignment_01
(CS604P) Assignment # 01
Solution:
folder_path = "/mnt/data/BC210200370"
os.makedirs(folder_path, exist_ok=True)
int sum = 0;
int num;
while (fscanf(file, "%d", &num) != EOF) {
sum += num;
}
fclose(file);
pthread_exit(NULL);
}
int main() {
pthread_t t1, t2;
return 0;
}
"""
c_file_path = os.path.join(folder_path, "BC210200370.c")
with open(c_file_path, "w") as f:
f.write(program_code.strip())
Screenshot: