Hi,

I created a program that makes a multiplication table, I dont know where the .txt file is located after executing the program

Im using turbo C++ :-/

#include<iostream.h>
#include<stdio.h>


void main(){

int multiplicand;
int multiplier;
int toprow;
int column;
int repeater;


FILE* Starter=fopen("multiplication.txt","w");


cout<<"Insert the number of repetitions: ";
cin>>repeater;

for(multiplicand=1, toprow=4; multiplicand<=repeater; multiplicand++, toprow=toprow+4){

gotoxy(toprow,10);
fprintf(Starter,"%d",multiplicand);
}

for(multiplicand=1, column=11; multiplicand<=repeater; multiplicand++,column++){
gotoxy(1,column);
fprintf(Starter,"%d",multiplicand);

for(multiplier=1, toprow=4; multiplier<=repeater; multiplier++, toprow=toprow+4){
gotoxy(toprow,column);
cout<<multiplier*multiplicand;
fprintf(Starter,"d",multiplier*multiplicand);
}

}

fclose(Starter);
}

Edited 6 Years Ago by Nick Evan: Added CODE-tags

It's probably in the same location as the .exe file. Either go to the directory into which you started the project or use Window's search utility to find it (you may have to expand the search area to include more than your documents, etc.).

This question has already been answered. Start a new discussion instead.