Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i am supposed to write the second function as g being an integer and the length to be lemgth=(int)log2(g)+1 but i do not even know

i am supposed to write the second function as g being an integer and the length to be lemgth=(int)log2(g)+1 but i do not even know where to start to get the function to read the values pertaining to b image text in transcribed
here is a clearer picture of this image text in transcribed
image text in transcribed
image text in transcribed
the clearer images are posted below here are the guidelines on the function computegreyint(g) must calculate using the math length=(int)log2(g)+1. i do not know how to properly write this function because everytime i try to do it i always popping up with an empty output any help could greatly be appreciated!! thank uou very much! the output is supposed to display the computed result in decimal value i.e. 0101= 5 etc
image text in transcribed
image text in transcribed
if someone could show me how to to properly write the second function to properly read from input and using the lemgth=log2(g)+1 portion in it so that i may see exactly how it is done that would be greatly appreciated in c++. like i said i am completely lost on how to do this i have tried reading as a string but that is not the correct way to be done and switching to the int conversion i am completely lost
Input:input will be from the file named "graycodes.dat". The first line of input gives the number of test cases, Nat most 25), test cases follow. Each test case is a line and starts with an Aora B. f the line starts with an A then there will follow 2 integers: number of bits. (1 Se 58) and position *{O SE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Image Databases Towards Advanced Image Retrieval

Authors: Yihong Gong

1st Edition

1461375037, 978-1461375036

More Books

Students also viewed these Databases questions

Question

How can the ERM framework help managers address business risk?

Answered: 1 week ago