1) write a program using arduino or the development board that measures gravitational acceleration in 3-axes and displays the values on the LCD screen.
The program will do the following:
a) To be run upon initialization (i.e. implement this in the setup() function)
• Initialize the development board
• Sound the buzzer
• Write the message “ACCELEROMETER” on the LCD screen.
• Wait two seconds
• Sound the buzzer
A data compression software utilities various steps to compress a string of data one of the steps involves find the count of the character that are not repeated in the string
write a program that will find the day of the week from a date and will also prepare a calendar on a monthly basis. (Science: day of the week). July 20, 1973 is a FRIDAY using Zeller’s congruence is an algorithm developed by Christian Zeller
h=(q+[26(m+1)/10] + y +[y/4] + 6 * [y/100]+[y/400]) % 7
Where,
■ h is the day of the week (0: Saturday, 1: Sunday, 2: Monday.....)
■ q is the day of the month
■ m is the month (3: March, 4: April, ….., 12: December)
■ y is the year
NOTE: In this algorithm, January and February are counted as months 13 and 14 of the previous year. E.g. if it is February 2, 2010, the algorithm counts the date as the second day of the fourteenth month of 2009 (02/14/2009 in DD/MM/YYYY format). Consequently, for January and February, the year y should be replaced by y – 1. Suffice to say, the month m should also be replaced by m + 12 then.
Sample Input/Output :
Input: Enter year: 2005 Enter month (1-12): 1 Enter day: 21
Output: January 21, 2005 is FRIDAY
Instructions:
Input
1. A three-digit integer
Output
The first line will contain a message prompt to input the 3-digit integer.
The last line contains the largest digit of the inputted integer.
Enter a 3-digit integer: 173
Largest = 7
Enter a 3-digit integer: 109
Largest = 9
Enter a 3-digit integer: 666
Largest = 6
Instructions:
Input
1. First decimal number
2. Second decimal number
3. Third decimal number
4. Fourth decimal number
Output
The first four lines will contain message prompts to input the four decimal numbers.
The last line contains the sum of all the inputted negative numbers, with 2 decimal places.
Enter the first number: -30.22
Enter the second number: 10.5
Enter the third number: -2.2
Enter the fourth number: -1.8
Sum of all negatives = -34.22
Enter the first number: 50.23
Enter the second number: 100.23
Enter the third number: -123.4
Enter the fourth number: 0.0
Sum of all negatives = -123.40
Instructions:
Input
1. First integer
2. Second integer
3. Third integer
Output
The first three lines will contain message prompts to input the 3 integers.
The last line contains the three integers in ascending order.
Enter the first integer: 6
Enter the second integer: 1
Enter the third integer: 3
1 3 6
1) write a program for the development board that measures gravitational acceleration in 3-axes and displays the values on the LCD screen.
The program will do the following:
a) To be run upon initialization (i.e. implement this in the setup() function)
• Initialize the development board
• Sound the buzzer
• Write the message “ACCELEROMETER” on the LCD screen.
• Wait two seconds
• Sound the buzzer
Sample Run:
Input:
[10, 45, 500, 400, 45, 56, 67, 78, 100, 8, 11]
[100, 450, 510, 410, 415, 56, 68, 87, 101, 9, 9]
[404, 445, 520, 450, 415, 156, 167, 488, 110, 4, 2]
[505, 445, 554, 410, 445, 556, 167, 178, 70, 4, 1]
[20, 100, 500, 345, 45, 65, 86, 69, 100, 7, 10]
[101, 246, 500, 355, 145, 165, 45, 45, 54, 8, 9]
[434, 456, 550, 395, 445, 165, 96, 369, 100, 4, 6]
[520, 340, 500, 405, 345, 565, 186, 169, 67, 3, 2]
Output:
Maximum Runs Scored: 556
Maximum Strike Rate: 286.206897
2. Mr. Raju want to read 10 array elements and wants to display them in the reverse way. Write a C
program to help Mr. Raju to display the array elements in the reverse way
Vijayalaksmi wants to check the number of times the word “ India” appears in a given
paragraph. Write a C program without using string function to do