Convert input String to UPPERCASE

Program to Convert Input String to UPPERCASE


import java.util.Scanner;

class LC 
{
 public static void main(String[] args) 
 {
  System.out.println("Enter a String : ");
  Scanner sc = new Scanner(System.in);
  String s = sc.next();
                String result="";
 
  for(int i=0 ; i< s.length() ; i++)
  {
   Character c= s.charAt(i);

   if(Character.isLowerCase(c))
   {
    Character newChar=Character.toUpperCase(c);
    result=result.concat(Character.toString(newChar));
    

          }  // if end
    else
    {
    result=result.concat(Character.toString(c));
    }     // else end

  }   //for end
  System.out.println("You entered "+s);
  System.out.println("Result is "+result);
 }
}




OUTPUT :

Fibonacci series Program ( C implementation )

A series of numbers in which each number (Fibonacci number) is the sum of the two preceding numbers. The simplest is the series 1, 1, 2,...

#include 
#include
void main(){
printf(" Fibonacci series \n ");
int prev=0;
int current=1;
int fibo;
int i;
for(i=1;i<15;i++)
{
fibo=prev+current;
printf("%d \n",fibo);
prev=current;
current=fibo;
}                            
}

OUTPUT