Thursday, 23 December 2021

C++ Program To Print ASCII value of Digits,Uppercase and Lowercase Alphabates

 Program :


#include<iostream>

#include<conio.h>

#include<dos.h>

#include<process.h>

using namespace std;

int main()

{

clrscr();

char ch,a[]={“Made By : Suvadeep Mondal”};

int j=0;


cout<<“Uppercase Alphabatesnn”;

for(int i=65;i<91;++i)

{

j++;

ch=i;

cout<<ch<<“:”<<i<<“t”;

if(j==10)

{

cout<<“n”;

j=0;

}

}

j=0;

cout<<“nnnLowercase Alphabatesnn”;

for(i=97;i<123;++i)

{

j++;

ch=i;

cout<<ch<<“:”<<i<<“t”;

if(j==10)

{

cout<<“n”;

j=0;

}

}


cout<<“nnnDigitsnn”;

for(i=48;i<58;i++)

{

ch=i;

cout<<ch<<“:”<<i<<“t”;

}


cout<<“nnnntt”;

for(i=0;a[i]!=’’;++i)

{

cout<<a[i];

sleep(1);

}

return 0;

}

Saturday, 12 June 2021

A simple C++ Program

Program :

 #include<iostream>

#include<conio.h>

using namespace std;

int main()

{

int i=6;

for(--i;--i;i--)

cout<<i;

getch();

}

Output :




Monday, 25 January 2021

Java Program to implement an interface structure

 Code : 

interface I1

{

  public void comppute1();

}


interface I2 extends I1

{

  public void compute2();

}


Output : 



Java Program to implement the concept of interface

 Code :

interface I1

{

  void compute1();

}

    class B implements I1

    {

      public void compute1()

      {

        System.out.println("Computed Output");

      }

     }

class Main

{

  public static void main()

  {

    B B1 = new B();

    B1.compute1();

  }

}

Output :  

   



Wednesday, 13 January 2021

CPP Program to implement function overloading.

 Code :

#include<iostream>

using namespace std;

int volume(int);

double volume(double,int);

long volume(long,int,int);

int main()

{

cout<< volume(10)<<endl;

cout<< volume(2.5,8)<<endl;

cout<< volume(100,75,15)<<endl;

return 0;

}

int volume(int s)

{

return(s*s*s);

}


double volume(double r,int h)

{

return(3.14519*r*r*h);

}


long volume(long l,int b,int h)

{

return(l*b*h);

}


Output :







Sunday, 10 January 2021

A simple Java program with multiple statements

 Code :


class SquareRoot

{

  public static void main(String args[])

  {

    double x = 5;                 // Declaration and initialization

      double y;                     // Simple declaration

      y = Math.sqrt(x);

      System.out.println("y = " + y);

  }

}


Output : 




A simple Java program to print Hello World

 Code :

class SampleOne

{

  public static void main(String args[])

  {

    System.out.println("Hello World");

  }

}


Output :