javascript
let str = "12345.00";
str = str.substring(0, str.length - 1);
javascript
let str = "12345.00";
str = str.substring(0, str.length - 1);
javascript
#include <conio.h>
/*function declaration
* name : getBinary
* Desc : to get binary value of decimal number
* Parameter : int -integer number
* return : void
*/
void getBinary(int);
int main()
{
int num=0;
printf("Enter an integer number :");
scanf("%x",&num);
printf("\nBinary value of %d is =",num);
getBinary(num);
return 0;
}
/*Function definition : getBinary()*/
void getBinary(int n)
{
int loop;
/*loop=15 , for 16 bits value, 15th bit to 0th bit*/
for(loop=15; loop>=0; loop--)
{
if( (1 << loop) & n)
printf("1");
else
printf("0");
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us