import java.util.*; public class prac2{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int reversed = 0; int...
Continue reading...JAVA PROGRAMS
Program in Java to display Fibonacci series
#include<stdio.h> int main() { int count, first_term = 0, second_term = 1, next_term, i; //Ask user to input number of...
Continue reading...Program in Javato Print an Integer entered by the user Copy
import java.util.*; public class Learner{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); int number=sc.nextInt(); System.out.println("Enter an integer: ");...
Continue reading...Program in C to find largest number using if statement
import java .util.*; public class Learner { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter first...
Continue reading...Program in Java to Print an Integer entered by the user
import java.util.*; public class Learner{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); int number=sc.nextInt(); System.out.println("Enter an integer: ");...
Continue reading...Program in Java to check whether the given integer is positive or negative
import java.util.*; public class Learner{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); int num=sc.nextInt(); System.out.println("Enter a number:"); if...
Continue reading...Program in Java to convert lowercase string to uppercase string
#include <stdio.h> int main() { int number, i; printf("Enter an integer: "); scanf("%d", &number); printf("Multiplication table of %d: n", number);...
Continue reading...Program in Java to convert lowercase string to uppercase string Copy
#include <stdio.h> int main() { int number, i; printf("Enter an integer: "); scanf("%d", &number); printf("Multiplication table of %d: n", number);...
Continue reading...Program in Java to Reverse a String using recursion
#include <stdio.h> #include <string.h> void reverse_string(char*, int, int); int main() { char char string_array[150]; printf("Enter any string:"); scanf("%s", &string_array); reverse_string(string_array,...
Continue reading...Program in Java to convert uppercase string to lowercase string
#include<stdio.h> #include<string.h> int main(){ char str[25]; int i; printf("Enter the string: "); scanf("%s",str); for(i=0;i<=strlen(str);i++){ if(str[i]>=65&&str[i]<=90) str[i]=str[i]+32; } printf("nLower Case String...
Continue reading...