int main() {
int d = 10;
int m = 2;
int y = 3603;
int c = 0;
int val;
val = ( d + m + y + (y/4) + c) % 7;
cout << val;
return 0;
}
Answer / Rakesh Singh
The given C++ code calculates a value using an arithmetic expression and prints it out. The value is calculated as the remainder when the sum of d (day), m (month), y (year), and c (century, set to 0) plus one-fourth of the year is divided by 7. This calculation could be used for a variety of purposes, such as determining the day of the week.
| Is This Answer Correct ? | 0 Yes | 0 No |
any one can help me to know the top mnc companies and their working platforms?i mean java,php...
A person was fined for exceeding the speed limit by 10mph.another person was also fined for exceeding the same speed limit by twice the same if the second person was traveling at a speed of 35 mph. find the speed limit?
There are prime factors of two numbers a and b , write a program using this prime factors whether a is divisible by b?
Write the fetch cycle and execute cycle for following instructions:JMPNZ (jump to the given address if the accumulator not equal to zero) RET(return from a subroutine) ADB (add the contents of register B to the accumulator and save result in the accumulator).
Can you get the name of the data file used as Infile in the control file used for sql loader, and store it in a column of a table if the name of the data files are in a particular fashion and it is getting picked up one by one for loading the data using the command "Infile *"
what is the main fuction of OSPF in a internetwork? how does work of same network?
in single linked list , each node contains data and address of next node. if middle of list the node is damaged/crashed then how to find where the link is failed and how to get the all the data which is stored after the crashed node?
why do you want to join tcs
how 2 write a program of this pattern usin for loop?? 1 2 3 4 5 6 7 8 9 10
How to select the total numbers of fire extinguisher installed in a room ?
Give an algorithm for the following problem and determine its time complexity. Given a list of n distinct positive integers, partition the list into two sublists, each of size n/2, such that the difference between the sums of the integers in the two sublists is maximized. You may assume that n is a multiple of 2 (i.e. n is even).
what is test initiation?can anybody post the answer urgently?
Civil Engineering (5086)
Mechanical Engineering (4453)
Electrical Engineering (16638)
Electronics Communications (3918)
Chemical Engineering (1095)
Aeronautical Engineering (239)
Bio Engineering (96)
Metallurgy (361)
Industrial Engineering (259)
Instrumentation (3014)
Automobile Engineering (332)
Mechatronics Engineering (97)
Marine Engineering (124)
Power Plant Engineering (172)
Textile Engineering (575)
Production Engineering (25)
Satellite Systems Engineering (106)
Engineering AllOther (1379)