Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

. Write a program using two-dimensional arrays that computes
the sum of data in tows and the sum of data in columns of
the 3x3 (three by three) array variable n[3][3].

Answer Posted / rowel baldemoro

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

using namespace std;
void design(int x, int y){

COORD coord;
coord.X=x;
coord.Y=y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coord);


}
int main()
{

int no[3][3],sum[2][3];

//1x3
design(1,0);
cin>>no[0][0];

design(4,0);
cin>>no[0][1];

design(7,0);
cin>>no[0][2];
sum[0][0]=no[0][0]+no[0][1]+no[0][2];

design(8,0);
printf("=%d",sum[0][0]);
//2x3
design(1,2);
cin>>no[1][0];

design(4,2);
cin>>no[1][1];

design(7,2);
cin>>no[1][2];
sum[0][1]=no[1][0]+no[1][1]+no[1][2];

design(8,2);
printf("=%d",sum[0][1]);
//3x3
design(1,4);
cin>>no[2][0];

design(4,4);
cin>>no[2][1];

design(7,4);
cin>>no[2][2];
sum[0][2]=no[2][0]+no[2][1]+no[2][2];

design(8,4);
printf("=%d",sum[0][2]);

sum[1][0]=0;
for(int i=0;i<3;i++){
design(1,6);

sum[1][0]=sum[1][0]+no[i][0];
cout<<sum[1][0];
}
design(4,6);


design(7,6);

getch();
}

Is This Answer Correct ?    10 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program using virtual function to find the transposing of a square matrix?

3305


how to take time as input in the format (12:02:13) from user so that controls remains between these columns?

2223


Code for Method of Handling Factorials of Any Size?

2425


write a program that can LOCATE and INSERT elements in array using c++ programming languages.

3964


can you please write a program for deadlock that can detect deadlock and to prevent deadlock.

3181


develop a program to calculate and print body mass index for 200 employees

2613


3. Program to find the Sum of give series. a. (1)+(1+2)+(1+2+3)+(1+2+3+4)+……………………………….. b. 1/1+1/9+1/25+1/49+……………...

4870


write a program using 2 D that searches a number and display the number of items 12 inputs values input 15,20, 13, 30, 38, 40,16, 18, 20 ,18 ,20 enter no. to search : 20

3766


i don't know about working of nested for loop can any one help me

2217


Performance Algorithm A performs 10n2 basic operations and algorithm B performs 300 lg n basic operations. For what value of n does algorithm B start to show its better performance?

7778


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

2465


We need to write the function to check the password entered is correct or not based on the following conditions.. a) It must have atleast one lower case character and one digit. b)It must not have any Upper case characters and any special characters c) length should be b/w 5-12. d) It should not have any same immediate patterns like abcanan1 : not acceptable coz of an an pattern abc11se: not acceptable, coz of pattern 11 123sd123 : acceptable, as not immediate pattern adfasdsdf : not acceptable, as no digits Aasdfasd12: not acceptable, as have uppercase character

4409


find level of following tree (state, parent) " J,D I,D H,C E,B F,B G,C B,A D,A C,A A,& K,E L,E L,F M,F N,G O,H P,I P,H Q,I R,J S,K U,P T,L

2413


Write a (n) algorithm that sorts n distinct integers, ranging in size between 1 and kn inclusive, where k is a constant positive integer. (Hint: Use a kn-element array.)

4934


Question 1: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date. *This Should Be Done IN C++

1096