14,837,356 members
Home / Discussions / C / C++ / MFC

# C / C++ / MFC

 Re: Stuck in 2 loops Member 124990122-May-16 19:26 Member 12499012 2-May-16 19:26
 Hey thank you for answer, I shared question originally and also how can identify your collection1.count and 2. yes should be like this. Thank you Copy Code ```Voltage readings are obtained from an electrical substation once every hour for six hours (so there are six readings). Write a C program to perform the following checks on the substation: a) display all voltages that differ from the average by more than 10% of the average. b) display all pairs of consecutive hours where the change from the voltage at one hour to the next is greater than 15% of the average. Example 1 Enter 6 voltages: 210.1 223.2 189.6 206.2 235.1 215.0 The average is 213.2 volts. 10% = 21.3 volts. 15% = 32.0 volts. The following problems occurred: 1. Voltage at hour 3 was 189.6 volts (difference of 23.6 volts). 2. Voltage at hour 5 was 235.1 volts (difference of 21.9 volts). 3. Voltage change from hour 2 to hour 3 was 33.6 volts. Example 2 Enter 6 voltages: 233.1 201.0 221.5 240.2 222.7 208.1 The average is 221.1 volts. 10% = 22.1 volts. 15% = 33.2 volts. No problems were encountered.``` I created project but when I put any think in for loops coming 11 "No problems were encountered" or put under for loops this result coming sometimes with voltage results.
 Re: Stuck in 2 loops Richard MacCutchan2-May-16 21:29 Richard MacCutchan 2-May-16 21:29
 Re: Stuck in 2 loops Member 124990122-May-16 23:43 Member 12499012 2-May-16 23:43
 Re: Stuck in 2 loops Parthiban.Appuswamy3-May-16 1:31 Parthiban.Appuswamy 3-May-16 1:31
 Re: Stuck in 2 loops Member 124990123-May-16 1:36 Member 12499012 3-May-16 1:36
 Re: Stuck in 2 loops Richard MacCutchan3-May-16 2:26 Richard MacCutchan 3-May-16 2:26
 Re: Stuck in 2 loops Member 124990123-May-16 2:47 Member 12499012 3-May-16 2:47
 Re: Stuck in 2 loops Richard MacCutchan3-May-16 2:55 Richard MacCutchan 3-May-16 2:55
 Re: Stuck in 2 loops Patrice T4-May-16 23:24 Patrice T 4-May-16 23:24
 Re: Stuck in 2 loops Richard MacCutchan5-May-16 0:26 Richard MacCutchan 5-May-16 0:26
 Re: Stuck in 2 loops Patrice T5-May-16 0:52 Patrice T 5-May-16 0:52
 Re: Stuck in 2 loops Richard MacCutchan5-May-16 1:08 Richard MacCutchan 5-May-16 1:08
 dotted rectangle is not being cleared if any empty string added in MFC comboboc Amrit Agr1-May-16 19:57 Amrit Agr 1-May-16 19:57
 Re: dotted rectangle is not being cleared if any empty string added in MFC comboboc leon de boer2-May-16 17:57 leon de boer 2-May-16 17:57
 Creation of class members of class created on the heap ForNow30-Apr-16 19:09 ForNow 30-Apr-16 19:09
 Re: Creation of class members of class created on the heap Richard MacCutchan30-Apr-16 20:38 Richard MacCutchan 30-Apr-16 20:38
 FIFO en languge C Member 1249381829-Apr-16 10:37 Member 12493818 29-Apr-16 10:37
 Re: FIFO en languge C Bram van Kampen29-Apr-16 11:48 Bram van Kampen 29-Apr-16 11:48
 Re: FIFO en languge C Patrice T30-Apr-16 21:29 Patrice T 30-Apr-16 21:29
 Re: FIFO en languge C CPallini1-May-16 20:49 CPallini 1-May-16 20:49
 Four methods to create, pass to function and delete 2d arrays in c++ Javier Luis Lopez28-Apr-16 23:32 Javier Luis Lopez 28-Apr-16 23:32
 Re: Three methods to create, pass to function and delete 2d arrays in c++ Bram van Kampen29-Apr-16 12:27 Bram van Kampen 29-Apr-16 12:27
 Re: Three methods to create, pass to function and delete 2d arrays in c++ Javier Luis Lopez29-Apr-16 23:05 Javier Luis Lopez 29-Apr-16 23:05
 Re: Three methods to create, pass to function and delete 2d arrays in c++ leon de boer29-Apr-16 18:01 leon de boer 29-Apr-16 18:01
 Re: Three methods to create, pass to function and delete 2d arrays in c++ Javier Luis Lopez29-Apr-16 23:08 Javier Luis Lopez 29-Apr-16 23:08
 Last Visit: 31-Dec-99 18:00     Last Update: 17-Apr-21 19:23 Refresh ᐊ Prev1...306307308309310311312313314315 Next ᐅ