Sunday, 24 January 2021

frequency of an element in an aaray

 import java.io.*;

class freq

{

    public static void main(String args[])throws IOException

    {

        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

        System.out.println("entre the number of digits");

        int n=Integer.parseInt(br.readLine());

        int f=0;

        System.out.println("entre the numbers");

        int a[]=new int[n];

        for(int i=0;i<n;i++)

        {

            a[i]=Integer.parseInt(br.readLine());

        }

        for(int i=0;i<n;i++)

        {

            int c=0;

            int c1=0;

            f=a[i];

            for(int j=i-1;j>=0;j--)

            {

               if(a[i]==a[j])

               {

                   c=c+1;

                }

            }

            if(c==0)

            {

                for(int j=i;j<n;j++)

                {

                    if(a[i]==a[j])

                    {

                        c1=c1+1;

                    }

                }

                System.out.println("frequency of"+a[i]+"is ="+c1);

            }

        }

    }

}

Sunday, 12 August 2018

How To visible all Files Infected by Shortcut Virus from USB Pendrive


    Just follow these steps ...........

  • Open My Computer.
  • Click on Tools option at the Top menu. Select Folder Options…
  • It will open a new window. Click on View tab.
  • Now, scroll down and look for the following option: Hidden files and folders. Under it, mark a check on Show hidden files and foldersoption.
  • Then just under it, you will see the following option: Hide protected operating system files (Recommended). Uncheck it.
  • Click on OK button.
  • That’s it. You’re done. Now, open your Pendrive and notice that all your files is visible now. However, it will not remove the shortcut virus but it will make all your files accessible.

thanks friends................