Write a C program that detects and reports on areas of brightness in the night s
ID: 3813084 • Letter: W
Question
Write a C program that detects and reports on areas of brightness in the night sky. You will input a portion of the night sky (from standard input) represented by an n × n grid of integers where n <= 500. Each value in the grid will indicate the detected brightness of that portion of the night sky with a 0 value indicating no light. Unfortunately the detection hardware sometimes reports erroneous values; these values will show up as negative numbers and must be filtered out prior to finding the bright spots. After preprocessing your data to filter out all of the noise (more on this below), your program must report the brightest coordinate and the brightness value for that coordinate in every 5 × 5 patch of the sky that contains no zeros. Report “(none)” if no bright spots exist. Keep in mind that bright areas may overlap, and that any bright spot should only be reported once. You should also report bright spots of the 5 × 5 areas you encounter as you scan the data in a top to bottom, left to right order.
You should preprocess your data to eliminate noise in following manner: for every negative value you encounter, average the (maximum of) 8 squares around it and replace the value with the average (rounded off to the nearest whole number; use nearbyint frommath.h). If one of the surrounding squares also is negative, use the value of 0 in computing the average.
Your input will consist of a single integer s representing the size of the grid followed by s × s data values. Your output should be presented exactly like the sample run (using your name, of course, instead of mine). You also must use functions to input your data into an array, to preprocess your array, and one to find and report the bright spots. In other words you should have at least 3 separate functions defined that each are passed your two-dimensional data array where one function only inputs the array, one function onlypreprocesses the data to eliminate noise, and one function only finds and reports the bright spots. These functions must all be called from main. You must define your array local to your main function and pass it into all functions that need it. You may not declare and use any global data (other than possibly preprocessor definitions to define the maximum size of the sky and debugging flags if used).
2 Sample Run
Data file:
20
0 0 0 0 0 0 0 13 18 18 15 5 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 6 16 19 16 6 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 12 16 18 17 5 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 12 14 12 14 9 0 0 0 0 0 0 0 0
00000000000000000000
00000000000000000000
00000000000000000000
0 0 0 0 0 0 0 0 0 8 10 4 6 10 0 0 0 0 0 0
0 0 0 0 3 3 5 3 -2 10 12 11 11 6 0 0 0 0 0 0
0 0 0 0 5 6 6 6 5 7 13 14 13 4 0 0 0 0 0 0
0 0 0 0 2 7 8 6 4 8 12 13 11 9 0 0 0 0 0 0
0 0 0 0 2 7 7 7 5 9 4 10 6 4 0 0 0 -2 0 0
00004434366450000000
00000000688750000000
00000000579860000000
00000000577830000000
00000000354440000000
00003330000000000000
0 0 0 -1 -1 -2 8 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 -1 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Terminal -tcsh 49x 17 liberty Cprogs/% gcc brightest.c liberty Cprogs a.out brightest4. dat Project #6; Dan Resler Grid size 20x20 Bright spots: 9,111 14 110, 6 8 8, 9 10 L 9, 101 13 110,111 13 [11,11] 10 114, 10] 9 liberty cprogs/96 IExplanation / Answer
Core banking may be a banking service provided by a gaggle of networked bank branches wherever customers could access their checking account and perform basic transactions from any of the member branch offices.
Core banking is usually related to retail banking and lots of banks treat the retail customers as their core banking customers. Businesses area unit sometimes managed via the company banking division of the establishment. Core banking covers basic depositing and disposal of cash.
Normal Core Banking functions can embody dealings accounts, loans, mortgages and payments. Banks create these services offered across multiple channels like ATMs, net banking, mobile banking and branches.[1]
The core banking services bank heavily on laptop and network technology to permit a bank to modify its record keeping and permit access from any location. it's been the event of banking software system that has allowed core banking solutions to be developed
Core banking solutions is jargon utilized in banking circles. The advancement in technology, particularly net and knowledge technology has light-emitting diode to new ways that of doing business in banking. These technologies have reduced manual add banks and increasing potency. The platform wherever communication technology and knowledge technology area unit united to suit core desires of banking is thought as core banking solutions. Here, laptop software system is developed to perform core operations of banking like recording of transactions, record maintenance, interest calculations on loans and deposits, client records, balance of payments and withdrawal. This software system is put in at totally different branches of bank then interconnected by suggests that of laptop networks supported telephones, satellite and therefore the net. It permits the banks customers to control accounts from any branch if it's put in core banking solutions.
Gartner defines a core industry as a back-end system that processes daily banking transactions, and posts updates to accounts and different monetary records. Core banking systems generally embody deposit, loan and credit-processing capabilities, with interfaces to account book systems and news tools. Core banking applications area unit usually one in every of the biggest single expense for banks and bequest software system area unit a significant issue in terms of allocating resources. Strategic defrayal on these systems relies on a mixture of service-oriented design and supporting technologies that make protractile architectures.
Many banks implement custom applications for core banking. Others implement/customize business ISV packages.[2]
While several banks run core banking in-house, there area unit some that use outsourced service suppliers yet. There area unit many Systems integrators like cognizant Technology Solutions, EdgeVerve Systems restricted, Capgemini, Accenture, IBM and TCS that implement these core banking packages at banks.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.