#include<iostream>
#define ROWSIZE 4 //declaring constant ROWSIZE
#define COLSIZE 4 //declaring constant COLSIZE
using namespace std;
int main()
{
cout<<ROWSIZE<<" "<<COLSIZE;
}
4.1 Declare two integer constants ROWSIZE equal to 4 and COLSIZEequal to 4.
4.1 4.2 (4) (4) Declare two integer constants ROWSIZE equal to 4 and COLSIZEequal to 4. Declare two inttwo-dimensional arrays, namely playlwith ROWSIZEnumber of rows and COLSIZEnumber of columns, and play2with ROWSIZEnumber of rows and COLSIZEnumber of columns, 4.3 Assume that values have been assigned to all the elements of playland play2. Also assume that an int variable trickyhas been declared and intialised to 0. Use nested forloops and write down the necessary C++ statements to do the following: Each...
QUESTION 4 16 marks 4.1 4.2 Declare two integer constants ROWSIZE equal to 4 and COLSIZEequal to 4. Declare two inttwo-dimensional arrays, namely playlwith ROWSIZEnumber of rows and COLSIZEnumber of columns, and play with ROWSIZEnumber of rows and COLSIZEnumber of columns, (4) (4) 4.3 Assume that values have been assigned to all the elements of playland play. Also assume that an int variable trickyhas been declared and intialised to 0. Use nested forloops and write down the necessary C++ statements...
QUESTION 4 16 marks 4.1 4.2 Declare two integer constants ROWI ZE equal to 4 and CO.SI ZEequal to 4. (4) Declare two i nt two-dimensional arrays, namely (4) playlwith ROMSI ZEnumber of rows and COL SI ZE number of columns, and pl ay2 with ROMI ZEnumber of rows and COL SI ZEnumber of columns, 4.3 Assume that values have been assigned to all the elements of pl ayland play. Also assume that ani nt variable tricky has been declared...
QUESTION 4 16 marks 4.1 4.2 (4) (4) Declare two integer constants RONGI ZE equal to 4 and Ca.SI ZEequal to 4. Declare two i nt two-dimensional arrays, namely playlwith ROWI ZEnumber of rows and COLSI ZEnumber of columns, and play2with RONGI ZEnumber of rows and COLSI ZEnumber of columns, 4.3 Assume that values have been assigned to all the elements of pl ayland play 2. Also assume that ani nt variable trickyhas been declared and intialised to 0. Use...
QUESTION 4 16 marks 4.1 4.2 (4) (4) Declare two integer constants RONGI ZE equal to 4 and Ca.SI ZEequal to 4. Declare two i nt two-dimensional arrays, namely playlwith ROWI ZEnumber of rows and COLSI ZEnumber of columns, and play2with RONGI ZEnumber of rows and COLSI ZEnumber of columns, 4.3 Assume that values have been assigned to all the elements of pl ayland play 2. Also assume that ani nt variable trickyhas been declared and intialised to 0. Use...
QUESTION 4 16 marks 4.1 Declare two integer constants ROWSIZE equal to 4 and COLSIZEequal to 4. (4) 4.2 Declare two inttwo‐dimensional arrays, namely play1with ROWSIZEnumber of rows and COLSIZEnumber of columns, and play2with ROWSIZEnumber of rows and COLSIZEnumber of columns 4.3 Assume that values have been assigned to all the elements of play1and play2. Also assume that an int variable trickyhas been declared and intialised to 0. Use nested forloops and write down the necessary C++ statements to do the following:...
In the pseudocode below: Function Integer perfect(Integer n) Declare Integer count = 0 Declare Integer sum = 0 While count < n Set count = count + 1 Set sum = sum + count End While Return sum End Function Function Integer perfect_sum(Integer n) Declare Integer count = 0 Declare Integer sum = 0 While count < n Set count = count + 1 Set sum = sum + perfect(count) End While Return sum End Function Module main() Display perfect_sum(5)...
What is wrong with the following pseudocode? Declare Count As Integer Declare TheNumber As Integer Set TheNumber = 12 For (Count = 10; Count>TheNumber; Count--) Write TheNumber + Count End For A) The limit condition in a For loop cannot be a variable B) The loop will never be entered since the initial value of Count is less than the test condition C) The loop will never end since the test condition will never be met D) A counter must...
In JAVA, given two integer variables petsPerFamily and noOfFamilies, declare an avgPets variable and write a statement that calculates the average number of pets per family so that a fractional average is produced.
Declare/Create an integer variable named num Declare/Create a character variable named word Declare/Create a double variable named price Declare/Create a boolean variable named tester *hint remember that when you declare/create a variable you give it a data type, name, and use a semicolon