. An ABC company’s plans to give a 6% year-end bonus to each of its employees
earning Rs 6,000 or more per month, and a fixed Rs. 250 bonus to the remaining
employees. Write an algorithm for calculating the bonus for an employee.
If you are trying to print a string, what happens if you leave out one of the quotation marks or both and why?
You can use a minus sign to make a negative number like -2. What happens for each of the following and why?
>>> 2++2
>>> 2--2
>>> 2+-2
>>> 2-+2
In math notation, leading zeros are OK, as in 02. What happens if you try this in Python and why?
What happens if you have two values with no operator and a space in between them and why?
Write the commands to perfom the tasks mentioned below on a word document and upolad the document.
1. A command to list the details of all the files and directories in your current directory.
2. List the contents of all the file directories starting with “d” in the /etc directories
3. In the directory named Documents create two directories named classwork1a and classwork1b.
4. In the classwork1a create two files label.txt and practice.txt.
5. Copy the file label.txt from classwork1a into classwork1b.
6. Create a symbolic link of practice.txt on the Desktop.
7. Rename label.txt to new_label.txt
8. Copy the file host.conf from the directory /etc into the directory classwork1a.
9. Display the first 15 lines of the file.
Please how can I insert public class in this code to run?
Help me check and debug for me
package ArrayList
import java.until.ArrayList;
import java.until.Scanner;
public class Groceries {
public static void main (String[] args); {
Scanner s = new Scanner (System.in);
ArrayList<String> Groceries = ArrayList();
groceries.add ("Apple");
groceries.add ("Milk");
groceries.add ("Bread");
groceries.add ("Chocolate");
groceries.add ("Sugar");
System.out.PrintIn("what groceries do you want to add?");
String input_groceries = s.nextLine();
groceries.add(input_groceries);
System.out.PrintIn("Here are your groceries: ");
for (int i = 0; i < groceries.size(); i++) {
{
System.out.printIn(groceries.get(i));
}
}
}
Create a program that will overload a function sum, which takes two
parameters of numeric data type and prints their sum function for
integers and floats.
Write a program which will do the following:
Create a class called
Triangle
. The three sides of the triangle
are private
members of the class. The
class should contain a member f
unction to determine whether a
triangle is equilateral, isosceles or
scalene.
The class
should
also
include member functions which will give area and perimeter of the
triangle. The side
s of the triangle should be taken as input from the user in the main function.
Write short HTML 5 codes to do the following:1 Headings - h1 to h6
2 Text formatting
3 Preformatted text (Preserve line breaks and spaces)
4 Sub and Superscript text
5 Insert contact information
6 Inserting horizontal lines
7 Create hyperlink
8 Creating a mailto link - A link that sends an e-mail
10
9 Setting width and height of the images11 Aligning images12 Making a simple table - The most basic form of a table13 Setting the dimension of a table14 Specify the table caption15 Tables with borders - Adding the default table borders16 Creating an unordered list17 Creating an ordered list18 Creating text input fields19 Creating password input fields20 Creating HTML5 new input fields21 Checkboxes and radio buttons22 Select boxes - A drop-down list23 Select box with a pre-selected value24 Grouping of options inside a select box25 Enable multiple selection inside a select box26 Textarea - A multi-line text input field27 Creating butto
Let A[nl][ml] and B[n2][m2] be an n x m matrix. Then, find product of C[n] [m], is a A and B is defined as C(i,k) = A(ij) x B(j,k). where j is multipied over for all possible values of i and k.
Input:
2 3
3 2
3 -2 5
3 0 4
2 3
-9 0
0 4
Output:
24 29
6 25
how to determine transitive relation into java program
Can you change this code into java code
#include <iostream>
using namespace std;
int countReflexive(int n){
int ans = 1 << (n*n - n);
return ans;
}
int main(){
int n ;
cin >> n ; // taking input n from the user using std cin.
int result = countReflexive(n); // calling function to calculate number of reflexive relations
cout << "Number of reflexive relations on set: " << result ; // printing the answer
return 0;
}