Questions: 1 680

Answers by our Experts: 1 680

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

1. define a structure employee with name, category , salary, tax as a member. read the name category and salary of employee and calculate the tax as below

categories
A 10% OF SALARY
B 15% OF SALARY
C 20% OF SALARY
OTHERS 30% OF SALARY


2.firstly write a program to accept the number of telephone calls made by a customer and the print out the rate in cents.
A rat is in a square maze of dimension N (1-index based). Maze contains 3 types of cells namely: holes (H), pipes (P) and special (S). If the current cell is of type holes, then rat can move to the other adjacent cell which is of type holes only. Same holds true for cells of type pipes and special. Besides this, special cell also has one more property i.e. if the current cell is of type special, then rat can also move to other adjacent cells of type holes and pipes. Simply put, a special cell can connect two cells of type holes and pipes. In the maze every cell contains a cheese of weight Wij and some cells are marked as walls (W). In case, if adjacent cell is of type wall then rat can't move to the adjacent cell.

The rat will start at (1, 1) and it has to reach cell (N, N), it is allowed to move only down or right, and it has to eat the maximum of the available cheese. Your task is to find out the maximum cheese that rat can eat in the journey from (1, 1) to (N, N). In case, if rat can't able to reach (N,
A string is said to be "Beautiful", if it contains only non repetitive alphabets. Let S be the string with lower case alphabets, your task is to find out the longest "Beautiful sub-string" present in the given string S.

Input Format:

First line starts with T, which is the number of test cases. Each test case contains string S.

Output Format:

Print the first longest beautiful sub string present in the string S.

Constraints:
1<=T<=10

1<=|S|<=5500, S will contain only lower case alphabets.


Sample Input and Output

SNo. Input Output
1
2
ss
abcdeddd


s
abcde
A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindromes with minimum number of character replacements.

Input Format:

First line starts with T, which is the number of test cases. Each test case contains a string (S).

Output Format:

For each test case print the minimum number of character replacements needed to convert the given string to palindrome.

Constraints:
1<=T<=100

1<=|S|<=60, S will contains only lower case alphabets ('a'-'z')


Sample Input and Output

SNo. Input Output
1
2
saarj
saaaa


2
1



Explanation:

For case 1, among many possibilities one is to replace 4-th character with 'a' and replace last character with 's'.

For case 2, among many possibilities one is to replace first character with 'a' to make it a palindrome.
I want some suggestion on c projects. I am now in 1st year of college. Except files,graphics programmings all programs i can do.
Reply me soon
write a c program for a simple calculator the system allows the user to choose the operator the she wants to use after the user has entered the 2 numbers the system must display the final answer?
write a c program magic game the game gives a user one chance to choose a number which is known only by the system the system must display "hurray,you won $1000" IF THE NUMBER GUESSED BY THE USER IS CORRECT ELSE MUST DISPLAY " INCORRECT ,BETTER LUCK NEXT TIME"?
write a c program that accepts a numbers from the user and display whether the number inputted is an even or odd number?
write a c program that prompts a user to enter two numbers ,the system must display the summation of the number?
LATEST TUTORIALS
APPROVED BY CLIENTS