Declare the structure EB, consisting of member variables are cust_id, st_reading, end_reading and tot_usage. Calculate the usage of electric energy and display the details of electricity bill of a customer.
Runtime Input :
150
2100
2200
100
Output :
150
2100
2200
100
In online journal system, the user has to give detail information about their abstract of the manual script before upload of source document. The abstract submitted by the author should not more than 300 words. The journal system uses program to count the number of vowels, consonants, digits and symbols in a given paragraph. Write a C program to count the number of vowels, consonants, digits and symbols using pointers.
Runtime Input :
1=>see-programming
Output :
No. of vowels: 5
No. of consonants: 9
No. of digits: 1
No. of symbols: 3
You are given a roadmap of a country consisting of N cities and M roads. Each city has a traffic light. The traffic light has only 2 colors, Green and Red. All the traffic lights will switch their color from Green to Red and vice versa after every T seconds. You can cross a city only when the traffic light in the city is Green. Initially, all the traffic lights are Green. At a city, if the traffic light is Red, you have to wait for it to switch its color to Green. The time taken to travel through any road is C seconds. Find the minimum amount of time (in seconds) required to move from city 1 to city N.
It is guaranteed that the given roadmap will be connected. Graph won't contain multiple edges and self loops.
Input Format
The first line contains 4 space-separated integers, N (1 <=N<10³). M (N-1M <= (N(N-1)/2), T (1 <=T <=10³) and C (1<<C<=10³). Next M lines contain two integers each, U and V denoting that there is a bidirectional road between U and V.
Videocon gives a hike in the salaries for its employees based on the number of TVs sold by the employees in the financial year. Vishnu wants to know his new salary. Following are the requirements to solve the problem
a) If the No’s of TV’s sold is less than 5000, then the hike is 5%
b) If the No’s of TV’s sold is greater than or equal to Rs 5000 and less than 6500 then the hike is 7%
c) If the No’s of TV’s sold is greater than or equal to Rs 6500 then the hike is 9%
d) Capture Vishnu’s present salary and the no of TV’s sold by Vishnu
e) Display Vishnu’s new salary
Mr. Ram has a plan of travel to the USA. He wants to keep track of the baggage weight. He will carry a backpack of 7 kg for sure. If he decides to carry one extra baggage, the weight increases by 23 kg. If he decides to carry two extra baggage, the weight increases by 46 kg. Software needs to be developed to decide how much baggage is carried by Ram with the following requirements. a. The number of baggage to be carried has to be captured. b. Check for the number of baggage. c. Compute the total weight.
d. Display the final weight carried by Ram
Declare an array to store up to 10 integer percentage values
write a program that accepts an MxN matrix then do the following:
Find the sum of the main and opposite diagonal elements of an MxN matrix and adds the main diagonal of the matrix as well as the opposite diagonal of the matrix
write a program to find the median of a user-defined array using bubble sort
Write a program to find the median of a user-defined array using bubble sort
declare an array to store 10