How can I better indent this?
Code:
//preprocessor directives
#define _CRT_SECURE_NO_DEPRECATE
#include<stdio.h>
int main()
{
//declare and initialize variables
int someInteger = 0;
double doubleValue = 0;
double doubleResult = 0;
double result = 0;
FILE *myFile; // pointer..............to numbers.txt
FILE *myOtherFile; // pointer..............to results.txt
myFile = fopen("numbers.txt", "w"); //opens a file numbers.txt to write to it (in this case numbers)
printf("\n\tWriting these six numbers\n\t%d\n\t\t%d\n\t\t\t%d\n\t\t\t\t%d\t\t\n\t\t%d\n\t%d\n\tto the file numbers.txt...\n\n\n", -7, 31, 44, 8, -31, 55); //this line of code is totally unnecessary
fprintf(myFile, "%d\n\t%d\n\t\t%d\n\t\t\t%d\t\t\n\t%d\n%d\n", -7, 31, 44, 8, -31, 55); //this line writes six numbers to the file numbers.txt
fclose(myFile); //closes the numbers.txt file so we can read from it
fopen("numbers.txt", "r"); //opens numbers.txt to read a number
fscanf(myFile, "%d", &someInteger); //reads the first number from the list
printf("The first integer in the file is: \n\n\t\t\t%d\n\n", someInteger);
printf("Enter a double to be multiplied by:\n\n\t\t\t%d\n\t\t\t", someInteger);
scanf("%lf", &doubleValue); //scans for user input
myOtherFile = fopen("result.txt", "w"); //opens a file result.txt to write to it (in this case the results from the calculation)
doubleResult = doubleValue * someInteger; //calculates for the result
fprintf(myOtherFile, "%lf", doubleResult); //stores the result into double Result
return 0;
}