Slip17
Write an R Program to calculate Decimal into binary of a given number.
>
binary_conversion<-function(n){
+ if(n>1){
+
+
binary_conversion(as.integer(n/2))
+ }
+ cat(n%%2)
+ }
> binary_conversion(11)
1011>
//Output
This is blog is useful for the students of BCA and BCS .
Slip17
Write an R Program to calculate Decimal into binary of a given number.
>
binary_conversion<-function(n){
+ if(n>1){
+
+
binary_conversion(as.integer(n/2))
+ }
+ cat(n%%2)
+ }
> binary_conversion(11)
1011>
//Output