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:
REM PROGRAM TO CONVERT TEMPERATURE IN CELCIUS TO FARENHEIT
CLS
INPUT “ENTER TEMPERATURE IN CELCIUS”; C
F = C * (9 / 5) + 32
PRINT “TEMPERATURE IN FARENHEIT=”; F
END
Explanation:
Your formula suggests a celcius to fahrenheit conversion...
Answer:
Salting is the preservation of food with dry edible salt. It is related to pickling in general and more specifically to brining also known as fermenting (preparing food with brine, that is, salty water) and is one form of curing.
Explanation:
Answer and Explanation:
In C programming language:
char fun(int*a, int*b){
printf("enter two integers: ");
scanf("%d%d",a,b);
int e;
printf("please enter a character: ");
e=getchar();
return e;
}
int main(int argc, char *argv[]) {
int d;
int f;
int g;
fun();
printf("%d%d%d", d, f, g);
}
We have declared a function fun type char above and called it in main. Note how he use the getchar function in c which reads the next available character(after the user inputs with printf()) and returns it as an integer. We then return the variable e holding the integer value as char fun() return value.
Answer:
b. foreign key
Explanation:
In the database world, a foreign key is a field on one table and a primary key for another table. The purpose of a foreign key is to provide linkages between two or more tables. Given two tables A and B, and making A the point of reference, a primary key is a field that is unique in A while a foreign key is unique in B.
On another hand, a composite primary key is a combination of two or more fields/columns on database table that can be used to uniquely identify each row in the table.
In the database lingua, what we have is a unique key not a distinct key, though the two words are similar in meaning.
A duplicate key is used when an information may be repeatedly entered on a table.
So the correct option is a foreign key.