Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void diagonalfile()
- {
- int x=0;
- int y=0;
- building[x][y]=number;
- int sum=0;
- printf("\n\n\n\t FILE OPEN \n\n\n");
- inp=fopen( " 2Dimdata.txt ","r");
- if(inp==NULL)
- {
- printf(" file 2Dimdata.txt failed to open");
- exit(0);
- }
- for(x=0; x<10;x++)
- {
- for(y=0; y<10;y++)
- {
- fscanf(inp,"%d",&number);
- printf("sum of diagonla equals %d",sum,building[x][y],(sum=sum+building[x][x]));
- }
- }
- }
Add Comment
Please, Sign In to add comment