#include <stdio.h> int byte2bits(int x); int bits2byte(int x); int main() { int choice, answer, byte, bit; printf("[1] Byte to Bits [8] Bits to Byte [0] Exit\n"); printf("Enter Choice:"); scanf("%d", &choice); switch(choice) { case 1:printf("Enter the number of byte:"); scanf("%d", &byte); answer=byte2bits(byte); printf("%d byte/s = %d bit/s", byte, answer); break; case 8:printf("Enter the number of bits:"); scanf("%d", &bit); answer=bits2byte(bit); printf("%d bit/s = %d byte/s", bit, answer); break; case 0:printf("\n\nExited Succesfully!"); break; } } int byte2bits(int x) { return(x*8); } int bits2byte(int x) { return(x/8); }