T-Mobile Wi-Fi 7:53 PM @ 28% D a savstate.view.usg.edu pose of Accessors (get se
ID: 3904752 • Letter: T
Question
T-Mobile Wi-Fi 7:53 PM @ 28% D a savstate.view.usg.edu pose of Accessors (get set) is to? (5 ps 5 of 6 1)What will be the output for the following code? (5 pts int[] array . C2.?.7,1.,4,6,7,11,14); Console.ritelie fortint i-@icarray Lengths Console.Hrite)arrayt42) osole.witetise 2) What is the main difference between a while and a for repetition statement?(5 pts.) 3)What is the symtax to accomplish the following tasks (10 pts.) a) Display the valae of element of string aray mySeringAray with index Initialize each of the ten elements of one-dimensional integer array mylnt Asray to 10 Total all the elements from step b dIncrease the sine of array in step b to 100 elements, assuming that the sine of the array was referenced to a constant sine )Initialine all clements in slp d toExplanation / Answer
11)
multiplies every element with 2 and prints to console
12) in while loop the repetition statement is evaulated next and condition is evaluated last but it is viceversa in for loop
13)
a)Console.Write("{0} ",myStringArray[5]);
b)for(int i=0;i<myIntArray.Length;i++)
{
if(i%9==0)
myIntArray[i]=10;//inddex 9 is the 10 th element
}
c)
double sum=0;
for(int i=0;i<myIntArray.Length;i++)
{
if(i%9==0)
sum+=myIntArray[i];//inddex 9 is the 10 th element
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.