We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Traffic Signal Management System Test Phase 1 Solutions & Discussion Due Date May 09, 2016

Traffic Signal Management System Test Phase 1 Solutions & Discussion Due Date May 09, 2016

Traffic Signal Management System Test Phase 1 Solutions & Discussion Due Date May 09, 2016 

Problem Statement for Test Phase 1:

 Heavy Decimal Count:

          A non-negative integer is called heavy if the average value of its digits in decimal representation exceeds 7.

For example, the number is 9688, it has four digits i.e. Nine, Six, Eight, Eight (9,6,8,8). The average value of its digits is (9+6+8+8)/4 = 7.75. As the average value 7.75 is greater than 7, so we can say that 9688 is a heavy number.

Now take another example, suppose given number is 41153. It has five digits i.e. 4,1,1,5,3.  Average value of its digits is (4+1+1+5+3)/5 = 2.8. As the average value 2.8 is less than 7, so we can say that 41153 is not a heavy number.

Now, it is required from you to write a function:

          heavyDeciCount(x,y)

In this function two non-negative integers X and Y will be passed as a parameters and the function will count and return the total number of heavy integers within the range of [x..y] (both ends included) (remember x and y are the parameters of the function).

You should consider the following conditions while writing and executing your code.

X is an integer within the range [0…500000];
Y is an integer within the range [0…500000];

X<=Y (X will be less than or equal to Y).

 

Working of a Program

For example, user gave two numbers i.e. X=9872 and Y=9884. Your program will take these numbers and pass to the function heavyDeciCount(x,y). The function should return 6, because there are six heavy integers within the range [9872….9884];

Calculation Performed by the function is:

Number

Avg. Calculation

Average Value

Is Heavy

9872

(9+8+7+2)/4

6.50

No

9873

(9+8+7+3)/4

6.75

No

9874

(9+8+7+4)/4

7.00

No

9875

(9+8+7+5)/4

7.25

Yes

9876

(9+8+7+6)/4

7.50

Yes

9877

(9+8+7+7)/4

7.75

Yes

9878

(9+8+7+8)/4

8.00

Yes

9879

(9+8+7+9)/4

8.25

Yes

9880

(9+8+8+0)/4

6.25

No

9881

(9+8+8+1)/4

6.50

No

9882

(9+8+8+2)/4

6.75

No

9883

(9+8+8+3)/4

7.00

No

9884

(9+8+8+4)/4

7.25

Yes

 

Total Heavy Count

6

 

 

Sample Output

Enter 1st integer: 9872

Enter 2nd integer: 9884

Number         Average        Is Heavy

9872             6.50              No

9873             6.75              No

9874             7.00              No

9875             7.25              Yes

9876             7.50              Yes

9877             7.75              Yes

9878             8.00              Yes

9879             8.25              Yes

9880             6.25              No

9881             6.50              No

9882             6.75              No

9883             7.00              No

9884             7.25              Yes

Total Heavy Count:   6


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Views: 1194

Replies to This Discussion

CS619 Test Phase # 1 Complete IDea Solution in C# >

Don?t Copy Paste get An Idea and try Your Self and 
please Bki Project Developers ko heavy pay krnay and un k fraud se Bachain.

Note: This is Complete Idea not a Complete Solution. please make your Assignment

Attachments:

CS619 Test Phase # 1 Complete IDea Solution in PHP >

Don?t Copy Paste get An Idea and try Your Self and 
please Bki Project Developers ko heavy pay krnay and un k fraud se Bachain.

Note: This is Complete Idea not a Complete Solution. please make your Assignment

Attachments:

The solutions posted here are not valid for basic learners, i think so, 
You don't have to use LINQ while being tested for basic knowledge. 

I think this will help students to build the logic....



plz sb students khud se bnayn....

test phase 1 k students k lie jinho ne es dafa project chose kia cs619

mara hai aap ny kon c language choose ki?

students who choosed CS619 project

anyone plz help which IDE be used for developing programs in C/C# ?

visual studio

visual studio

Test phase 1 solution only RS1000
contact No 03217157656

YES

RSS

Latest Activity

Ayesha liked +M.Tariq Malik's discussion ENG201 Business and Technical English Writing GDB No 01 Fall 2020 Solution / Discussion Last Date: 08-12-2020
1 minute ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion ENG201 Business and Technical English Writing GDB No 01 Fall 2020 Solution / Discussion Last Date: 08-12-2020 in the group ENG201 Business and Technical English Writing
12 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion PSY516 Statistics in Psychology Assignment 01 Fall 2020 Solution / Discussion in the group PSY516 Statistics in Psychology
13 minutes ago
+M.Tariq Malik liked +M.Tariq Malik's discussion PSY516 Statistics in Psychology Assignment 01 Fall 2020 Solution / Discussion
13 minutes ago
+M.Tariq Malik added a discussion to the group PSY516 Statistics in Psychology
14 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion PSY404 Abnormal Psychology Assignment 01 Fall 2020 Solution / Discussion in the group PSY404 Abnormal Psychology
14 minutes ago
+M.Tariq Malik liked +M.Tariq Malik's discussion PSY404 Abnormal Psychology Assignment 01 Fall 2020 Solution / Discussion
14 minutes ago
+M.Tariq Malik added a discussion to the group PSY404 Abnormal Psychology
15 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion PSY631 Psychological Testing & Measurements Assignment 01 Fall 2020 Solution / Discussion in the group PSY631 Psychological Testing & Measurements
16 minutes ago
+M.Tariq Malik liked +M.Tariq Malik's discussion PSY631 Psychological Testing & Measurements Assignment 01 Fall 2020 Solution / Discussion
16 minutes ago
+M.Tariq Malik added a discussion to the group PSY631 Psychological Testing & Measurements
16 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion PSY515 Cross Cultural Psychology Assignment 01 Fall 2020 Solution / Discussion in the group PSY515 Cross Cultural Psychology
18 minutes ago
+M.Tariq Malik liked +M.Tariq Malik's discussion PSY515 Cross Cultural Psychology Assignment 01 Fall 2020 Solution / Discussion
18 minutes ago
+M.Tariq Malik added a discussion to the group PSY515 Cross Cultural Psychology
19 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion PSY504 Cognitive Psychology Assignment 01 Fall 2020 Solution / Discussion in the group PSY504 Cognitive Psychology
20 minutes ago
+M.Tariq Malik liked +M.Tariq Malik's discussion PSY504 Cognitive Psychology Assignment 01 Fall 2020 Solution / Discussion
20 minutes ago
+M.Tariq Malik added a discussion to the group PSY504 Cognitive Psychology
21 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion PSY632 Theory & Practice of Counseling Assignment 01 Fall 2020 Solution / Discussion in the group PSY632 Theory & Practice of Counseling
22 minutes ago
+M.Tariq Malik added a discussion to the group PSY632 Theory & Practice of Counseling
23 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion PSY512 Gender Issues in Psychology Assignment 01 Fall 2020 Solution / Discussion in the group PSY512 Gender Issues in Psychology
23 minutes ago

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.