Answer:
enhanced for loop
Explanation:
Enhanced for loop is an improve concept about loops, this features was implemented in Java SE 5.0 version, this method simplify the For structure. For example:
for (int i = 0; i <array.length; i ++) {
System.out.print (array [i]);
}
Enhanced for loop
for (String element : array) {
System.out.print(element);
}
Answer:
Table for Area codes are not missing;
See Attachment for area codes and major city I used
This program will be implemented using c++ programming language.
// Comments are used for explanatory purposes
// Program starts here
#include <iostream>
using namespace std;
int main( )
{
// Declare Variable area_code
int area_code;
// Prompt response from user
cout<<Enter your area code: ";
cin<<"area_code;
// Start switch statement
switch (area_code) {
// Major city Albany has 1 area code: 229...
case 229:
cout<<"Albany\n";
break;
// Major city Atlanta has 4 area codes: 404, 470 678 and 770
case 404:
case 470:
case 678:
case 770:
cout<<"Atlanta\n";
break;
//Major city Columbus has 2 area code:706 and 762...
case 706:
case 762:
cout<<"Columbus\n";
break;
//Major city Macon has 1 area code: 478...
case 478:
cout<<"Macon\n";
break;
//Major city Savannah has 1 area code: 912..
case 912:
cout<<"Savannah\n";
break;
default:
cout<<"Area code not recognized\n";
}
return 0;
}
// End of Program
The syntax used for the above program is; om
Answer:
The following transcript has been encoded can you decode it???
Explanation:
It is a ceasar cipher. Shift every letter in the alphabet by 22 positions.
<u>Answer:</u>
<em>using System;
</em>
<em>public class Program
</em>
<em>{
</em>
<em> public static void Main()
</em>
<em> {
</em>
<em> String input ;
</em>
<em> while(true)
</em>
<em> {
</em>
<em> input = Console.ReadLine();
</em>
<em> if(input.Equals(""quit""))
</em>
<em> break;
</em>
<em> Reverse_String(input);
</em>
<em> }
</em>
<em> return;
</em>
<em> }
</em>
<em>static void Reverse_String(string input_text)
</em>
<em>{
</em>
<em> char[] text = input_text.ToCharArray();
</em>
<em> Array.Reverse(text);
</em>
<em> Console.WriteLine(text);
</em>
<em>}
</em>
<u>Explanation:</u>
<em>In the above program a separate function is written to reverse the string.</em>
This method takes the string as an argument and place it in a array and then use the built-in function reverse and print the reversed string in the console.
<em>In the main(), the input is obtained from the console and it is passed to the reversestring().
</em>