Answer and Explanation:
Using javascript:
function dayof_theweek(){
var TodayDate = window. prompt("enter today's date in the format 'year, month, day' ");
var Datenow=new date(TodayDate);
var Dayofweek=Datenow.getday();
var Days=["monday","Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
if(Dayofweek==indexOf(Days[Dayofweek]))
{
document.createTextnode(Days[Dayofweek]);
}
}
The program above uses a date object which uses the method getday to get the day of the week(get day returns an integer from 0 to 6).we then use a comparison operator == to test the condition that returned value Dayoftheweek is same with the index of the array Days and then print to a html document. The program may need improvements such as the fact that errors may arise when proper input isn't given, and therefore must be handled.
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
the answer to the question is c. i hope this helps.
Basic blocks are identified because they are known to be a straight line that is known also as a code sequence that tends to have no branches in regards to its in and out branches and its exception is only to the entry and at the end.
Note that Basic Block is said to be a composition of statements that is known to be one that often always executes one after other, and this is often done in a sequence.
<h3>How do you create a flow graph from the basic blocks?</h3>
Flow graph is gotten by:
- Lets Block B1 be the initial node and also Block B2 will tend to follows B1, so from B2 to B1 there is seen a kind of an edge.
Note that the first task is for a person to partition a sequence of three-address code and this is done into basic blocks.
Hence, Basic blocks are identified because they are known to be a straight line that is known also as a code sequence that tends to have no branches in regards to its in and out branches and its exception is only to the entry and at the end.
Learn more about basic blocks from
brainly.com/question/132319
#SPJ1
The answer is computer. A computer is made up of microchips (CPU and GPU), an operation system (macOS or Windows), input methods (keyboard and mouse), and other parts.