Yes in my opinion. People will say no but there is no right answer
Answer:
// program in C++ to check leap year.
// include header
#include<iostream>
using namespace std;
// main function
int main() {
// variable
int inp_year ;
// ask user to enter year
cout<<"Enter year:";
// read year
cin>>inp_year;
// check year is leap or not
if (((inp_year % 4 == 0) && (inp_year % 100 != 0)) || (inp_year % 400 == 0))
// if leap year , print leap year
cout<<inp_year<<" is a leap year.";
else
// print not leap year
cout<<inp_year<<" is not a leap year.";
return 0;
}
Explanation:
Read year from user.Then check if year is divisible by 4 and not divisible by 100 or year is divisible by 400 then year is leap year.otherwise year is not leap year.
Output:
Enter year:1712
1712 is a leap year.
Answer:
The statement and the expression is "credits = credits<0?0 : credits;" for the above question.
Explanation:
- The conditional expression is an expression that is used to determine the true and the false case. It works like the if and the else statement.
- It has three parts which are shown above, in which the first part is to check the condition, the second part is excuted if the condition is true and the third part is executed if the condition is false. The variable is used to assign the value.
- If any user provides the credit value and writes the above statement then the credit variable holds 0 for negative value and it holds the original value for any positive or zero value.
The separate identity allows the database definition to be changed without affecting related applications is known as <u>DATA.</u>
<u>Explanation:</u>
Normally nowadays program and database are keeping separately. MySQL server, mongo dB, oracle, sql server extra installed separate followed folder or separate drive in operating system.
So software program just use connectivity technology to add or update or delete information from in the database. Form or report just access the data from database and produce required output.
Normal SQL database will stored as records as rows in tables. Normally database can been access through database application directly to update records such as SQL PLUS, MYSQL workbench etc.