Posts

Mobile App development/coding solution & publishing

Application:- https://play.google.com/store/apps/details?id=com.newz.allnewspaperinoneapp   Source Code- https://github.com/ChakrabortyAnimesh/Allinonenewspaper                         https://animeshportfolio.web.app/ https://drive.google.com/drive/folders/1wINabxTz5LspHs6V941PMyaVtoGpYf4S                               https://technicalnewsfirst.blogspot.com/2020/04/a-string-is-anagram-or-not-in-java.html         https://technicalnewsfirst.blogspot.com/2020/04/smallest-character-in-string-as-per.html    https://technicalnewsfirst.blogspot.com/2020/04/distancebetween2dcoordinates.html        https://technicalnewsfirst.blogspot.com/2020/04/basic-calcu...

poetry Writing

Image

prime number print as per given range

# include < stdio.h > int main () { int i,j,flag,temp; int beg,end; scanf ( " %d %d " ,&beg,&end); if (beg== 1 ) beg= 2 ; if (beg>end) { temp=beg; beg=end; end=temp; } for (i=beg;i<=end;i++) { flag= 0 ; for (j= 2 ;j<i;j++) { if (i%j== 0 ) { flag= 1 ; break ; } } if (flag== 0 ) printf ( " %d " ,i); } return 0 ; }

Square Root of a number without using math.h function

# include < stdio.h > # include < string.h > # include < stdlib.h > void main () { int number; float temp, sqrt ; scanf ( " %d " , &number); // store the half of the given number e.g from 256 => 128 sqrt = number / 2 ; temp = 0 ; // Iterate until sqrt is different of temp, that is updated on the loop while ( sqrt != temp){ // initially 0, is updated with the initial value of 128 // (on second iteration = 65) // and so on temp = sqrt ; // Then, replace values (256 / 128 + 128 ) / 2 = 65 // (on second iteration 34.46923076923077) // and so on sqrt = ( number/temp + temp) / 2 ; } printf ( " %.0f " , sqrt ); }

Basic calculator using C programming

# include < stdio.h > # include < stdlib.h > int main () { // num1 num2 + int num1,num2; char operator; scanf ( " %d %d %c " ,&num1,&num2,&operator); switch (operator) { case ' + ' : printf ( " %d " ,num1+num2); break ; case ' - ' : printf ( " %d " ,num1-num2); break ; case ' * ' : printf ( " %d " ,num1*num2); break ; case ' / ' : if (num2== 0 ) { printf ( " Not divisible by zero " ); break ; } else { printf ( " %d " ,num1/num2); break ; } default : printf ( " invalid " ); } return 0 ; }

Factorial of consecutively 5 numbers(input)

import java.util.Scanner ; public class Main { public static void main ( String [] args ) { // write your code here int arr[] = new int [ 5 ]; Scanner sc = new Scanner ( System . in); for ( int i = 0 ;i < 5 ;i ++ ) { arr[i] = sc . nextInt(); } for ( int i = 0 ;i < arr . length;i ++ ) { System . out . println(factorial(arr[i])); ; } } private static int factorial ( int num ) { int fact = 1 ; for ( int i = 1 ;i <= num;i ++ ) fact = fact * i; return fact; } }