Posts

Showing posts from July, 2017

INTRODUCTION

Image
\                                                   All ABOUT PROGRAMMING                                                   EAT-SLEEP-CODE-REPEAT                                                   BE PATIENT                                                   WE ARE BEGINNER                                                   WE ARE STRIVERS

Hello World in C++

Image
PROGRAMME:- __________________________________________________________________________________________________________________________________ #include<iostream.h> #include<conio.h> void main() {    clrscr();    cout <<"Hello World.";    getch(); } __

Hello World in C

Image
PROGRAMME:- __________________________________________________________________________________________________________________________________ #include  (less than) stdio.h (greater than) // Header Files #include  (less than) conio.h (less than) // Header Files void main(){  printf("Hello World"); // print statement getch();  } 

Star Pattern 2 in Java

Image
PROGRAMME:- __________________________________________________________________________________________________________________________________ class Triangle { public static void main(String[] args)  { int i,j,k; for(i=1; i(less)=5; i++) { for(j=4; j(greater)=i; j--) { System.out.print(" "); } for(k=1; k(less)=(2*i-1); k++) { System.out.print("*"); } System.out.println(""); } } }

Reverse Number in java

Image
PROGRAMME :- class Reverse { public static void main(String ar[]) //Main Method { int n=125,r,rev=0; while(n!=0) { r=n%10; rev=rev*10+r;    //logic n=n/10; } System.out.println("Reverse is"+rev); } }

Star Pattern 1 in java

Image
PROGRAMME :- class Star { public static void main(String ar[]) //Main Method { int i,j; for(i=1;i<=3;i++) //First For loop { for(j=1;j<=i;j++) //Second For loop { System.out.print("*"); } System.out.println(); } } } //Output Success

Even And Odd No Beetween 1 to 50 in java

Image
PROGRAMME :- class Even { public static void main(String ar[]) //Main Method { int i; for(i=1;i<=50;i++) //First For loop { if(i%2==0) //Condition Apply { System.out.println("Even nos are"+i); } else { System.out.println("Odd nos are"+i); } } } } //Output Success THANKS FOR WATCHING GUYS.....!!!!!!!!!!!!!!