How to get smallest number in columns using 2d array.
And my task is to get smallest number in first column only.
2. The distance from Point A to Point B is n meters(n>2). A person goes from point A to point B walking by taking steps of size 2 meters or 3 meters. Please write a program to find the total number of ways in which the person can do this. The program should take n as input. For e.g., if input n = 5 the output should be 2, since the person can do this in two ways:
1. Take 2 steps followed by 3 steps.
2. Take 3 steps followed by 2 steps.
Define a structure for electricity board, the structure members customer name, unit consumed, sub charge and total charge. Implement the C program to calculate charges of the following rates for the energy consume,
Number of Units Cost per Unit
· For the first 200 units Rs. 5 per unit
· For the next 100 units Rs. 8 per unit
· For the next and above 300 units Rs. 10 per unit
The users are charged a minimum of Rs. 200/- as meter charge, and then an additional surcharge of 5% of total amount is charged. Read the customer names and number of units consumed as input and display the customer name, sub charges and total charge
Input :
Gopinath
150
Output :
Customer Name: Gopinath
Sub Charge: 37.50
Total Charge: 987.50
Implement a C program for file operations to read a string from standard input and prints the entered string using fgets() and fputs() function.
Note: Create the text file, fstring.txt
Input :
Hai
Output :
Hai
Define a structure for electricity board, the structure members customer name, unit consumed, sub charge and total charge. Implement the C program to calculate charges of the following rates for the energy consume,
Number of Units Cost per Unit
· For the first 200 units Rs. 5 per unit
· For the next 100 units Rs. 8 per unit
· For the next and above 300 units Rs. 10 per unit
The users are charged a minimum of Rs. 200/- as meter charge, and then an additional surcharge of 5% of total amount is charged. Read the customer names and number of units consumed as input and display the customer name, sub charges and total charge
Declare the structure Employee, consisting of members variables are
emp_number, emp_name, department, salary and net_salary. Calculate
DA=20% of salary and display the information of an employee.
Create a program using a Two-Dimensional Array that will display values
Design a C program to remove the special symbols from the input string, and print the characters present in the string and the number of symbols. Symbols: * + << >>
Runtime Input :
XYZ**ABC++
Output :
XYZABC
6
An e‐commerce company is planning to start a new automated order I'd generator system fo book orders. For this purpose a random steing consisting of only digits is only fed to the system. From this random number, the order I'd is generated as a string which is a concatenation of sum of digits at extreme left and extreme right position, then the sum of digits at second left and second last right position and so on,until there is no digit left for consideration. Where there is a single digit then add zero to it .write an algorithm to find the order I'd for the book order
Write a program to check if a given number is a prime or not