write a c program which reads the marks of a student in physics,chemistry,and mathemaics,and stores them in integer variables p,c,m.The program should print (Eligible/Not Eligible) based on the following eligibility criteria for admission to a degree course:
Marks in Maths >=65
Marks in Phy >=55
Marks in Chem>=50
Total in all three subject>=190
or
Total in Math and Physics>=140
Requirements:
(1) Write a program that declares a single-dimensional arrays named num.
(2) The numbers to be stored in num are 45, 86, 12, 37, 28, 113.
(3) Sum odds and evens separately.
(4) Finally, give the results that will be displayed on the screen.
Requirements:
(1) Please enter the value of a year through the keyboard.
(2) Please program to determine whether the entered year is a leap year.
(3) The conditions for a leap year are: divisible by 4 but not divisible by 100; or divisible by 400.
Project 3: Application of if statement
Requirements:
(1) Please program to judge the positive and negative and odd and even of an input integer.
(2) If it is a positive number, please output z; if it is a negative number, please output f.
(3) If it is an even number, please output o; if it is an odd number, please output j.
Requirements:
(1) Convert the inputted 3-digit integer, the single digit to a hundred digit, and the hundreds digit to a single digit, and generate a new inverted number from the converted 3 digits.
(2) Arbitrary 3-digit integers are input by keyboard.
(3) When outputting the result, the required form is: original number: converted number.
(1) Please enter any character from the keyboard.
(2) Please let the computer output two lines: the first line is in the form of characters, 3 characters are output, the 3 characters are separated by commas, and the second line is the ASCII code corresponding to the output characters.
. Negative Decimal Tally by CodeChum Admin
We've been giving positive numbers too much attention lately, it's time to let negative numbers take the spotlight this time!
Instructions:
Input four float numbers; they could be positive or negative.
Only add all inputted negative numbers, and print its sum, up to 2 decimal place.
Hint: The previous/latest topic is about if-else-elseif statements, but do we need one here?
Instructions
Input four decimal numbers, they could be positive or negative.
Add all the negative numbers, and print the sum, up to 2 decimal places.
Input
A line containing four decimals/floats separated by a space.
-30.22·10.5·-2.2·-1.8
Output
A line containing a negative decimal/floats with two decimal places.
-34.22
A university's library has been having electricity issues and students have been struggling to study during nights.
Each light source can illuminate a circle with a radius of r, and there are n tables in the library and the ith table is positioned at point (xi, yi). You have to help the university find the minimum number of light sources (k), such that each table is illuminated by at least 1 light source.
Input format
• The first line contains integers n and r respectively.
• In each of the next n lines, there are two integers representing xi and yi respectively that display the position of the ith table.
Output format
• In the first line of output, print an integer k that represents the number of light sources.
• In each of the next k lines, print two decimal numbers representing xi, yi respectively that shows the location of the ith light source.
https://drive.google.com/file/d/1wWA7nKnFWaG5XgtzzLPymfbuqiIf7WH8/view?usp=sharing
We've already done looping through a series of numbers and printing out its squares, so how about we level it up and go with cubes this time?
I have a condition though; I don't want to be associated with numbers that are divisible by 3 or 5 so if an integer is divisible by either of the two, don't make their cube values appear on the screen, please.
Care to fulfill my request?
Instructions:
I wanna experiment on looping through a range of numbers that will be randomly inputted by the user. However, I don't want to let them see the loading percentage that is divisible by 4, so please exclude those for me when printing it out.
Thank you!
Instructions: