Declare a character array cArray of length 10.
• Input the values from user.
• Pass that array to a function copy using a pointer.
• Copy the values of cArray in c1Array using dereferencing.
some tic values are divided into two parts . You have to combine these two parts into one tic string. Then, load the data into a dataframe
like this:
20141130 GIS 7713.1
20150228 GIS 6642.6
20150531 GIS 7607.7
19990630 GNT X 0.0000
19990930 GNT X 0.0000
19991231 GNT X 0.0000
20000331 GNT X 0.0000
20000630 GNT X 0.0000
The above is correct, the below converts to the above
Problem: Make a program that will accept 2 numbers and a choice of operation (1 = Display Sum, 2 = Display Difference, 3 = Display Product, 4 = Display Quotient, and 5 = Display All). if the choice input is not from 1 to 5, reaccept an input again. Display the selected option by the user.
Example input and output:
Enter number: 5
Enter number: 2
[1] Display Sum
[2] Display Difference
[3] Display Product
[4] Display Quotient
[5] Display All
Input choice: -1
[1] Display Sum
[2] Display Difference
[3] Display Product
[4] Display Quotient
[5] Display All
Input choice: 10
[1] Display Sum
[2] Display Difference
[3] Display Product
[4] Display Quotient
[5] Display All
Input choice: 5
Sum : 7
Difference: 3
Product: 10
Quotient: 2
Write a program that will ask the user to enter a digit character (i.e. ‘0’ or ‘1’ .... or ‘9’). If user
enters a non-digit character then the program should display message to re-enter correct input.
A man takes a job for 30 days. His pay for the first day is calculated as square
of his joining date. Assume he’s
joining on 3rd of the month, then his starting
pay is Rs 9/. After that his pay for the consecutive days are twice the pay of
previous day .i.e. each day’s pay is twice the pay of previous day. Write a c
program using functions to find his total pay for 3
0 days.
An online retailer sells five different products, whose retail prices are shown in
the following table:
Product number
Retail price
1
$2.98
2
$4.50
3
$9.98
4
$4.49
5
$6.87
Write a C program that reads a series of pairs of input as follows:
a.
Product number
b.
Quantity sold for one day
Write a program to help and determine the retail price for each product. Calculate
and display the total retail
value of all produ
Identifying a compressed gas cylinder is
based on the first letter of the
cylinder’s color printed on the cylinder. For Example
‘Y’ or ‘y’ for yellow, ’O’
or ‘o’ for orange and so on. Cylinder colors and associated contents are as
follows.
Orange
--
Ammonia
Brown
--
Carbon monoxide
Yellow
--
Hydrogen
Green
--
Oxygen.
Write a C program using switch case to identify the type of gas compresse
d
in a given cylinder.
Pak-Wheel requested for a software and asked for the following functionalities.
o Client name, contact, email and transection (only one) are important to keep.
o Client can buy or sell car through pinwheels. The transection details which are
important to keep are date (day), transection type (Buy or Sell) and amount.
Implement the above demand in such a way what if the client is deleted, none of its transection
record will remain. (Use Composition)
4. Later they requested another functionality to be incorporated within the program:
o The car should have its owner detail (client) but if the car is gone or sold, the client
should remain. (Use Aggregation)
In java
Create a java program to test if a password is valid or not. For the password to be acceptable it must satisfy the following rules:
- At least one (1) vowel.
- No two (2) consecutive same letter, except "ee" or "oo".
- No three (3) consecutive vowels.
- Must not be more than 20 characters and no uppercase letter.
Input
Enter one or more possible password per line, the word "end" ends the input.
Output
Display the entered password followed by either "is Valid" or "is Invalid"
Sample Input
bee
books
pc
beautiful
ambitious
end
Sample Output
bee is Valid
books is Valid
pc is Invalid
beautiful is Invalid
ambitious is Invalid
Create a program that will String input. Based on the number of inputs, the program will decide what shape it is. (1 input – circle, 2 inputs – square or rectangle, 3 inputs - triangle). The program will then display the shape type, details, perimeter and area.
Justines-MacBook-Pro:classes Justine$ java-jar Shape.jar15
Type:Circle
Radius:15
Perimeter:94.2
Area:706.5
Justines-MacBook-Pro:classes Justine$ java-jar Shape.jar15
Type:Rectagle
Length:24
Width:12
Perimeter:72.0
Area:288.0
Justines-MacBook-Pro:classes Justine$ java-jar Shape.jar15
Type:Square
Side:12
Perimeter:48.0
Area:144.0
Justines-MacBook-Pro:classes Justine$ java-jar Shape.jar 9 15 12
Type:Triangle
Sides:9, 15, 12
Perimeter:36.0
Area:54.0
Justines-MacBook-Pro:classes Justine$ java-jar Shape.jar 9 15 12 8
Invalid input