Friday, December 6, 2024

USD TO INR C++ PROGRAMMING

 NALLAMUTHU GOUNDER MAHALINGAM COLLEGE                   

                           POLLACHI-642001

                                     R.Rasigapriya

                           Bsc Computer Science(Ist Year)

                              15.USD TO INR

#include <iostream>

int  main()

{

   double inr,usd;

   double rate;

   std::cout<<"Enter the USD"<<std::endl;

   std::cin>>usd;

   std::cout<<"Enter the indian rate for the USD"<<std::endl;

   std::cin>>rate;

   inr=usd/(1.0/rate);

   std::cout<<"The Indian rupee for the USD is\t"<<inr<<std::endl;

   return 0;

}

OUTPUT:



USD TO INR C++ program

  NALLAMUTHU GOUNDER MAHALINGAM       COLLEGE

                      POLLACHI-642001

                                                   N.DHIVYA

                                 BSC COMPUTER SCIENCE(1st year)

                                15.USD TO INR

#include <iostream>

int main()

{

    double inr,usd;

    double dollar;

    std::cout<<"Enter the US dollar:"<<std::endl;

    std::cin>>usd;

    std::cout<<"enter the value for one us dollar"<<std::endl;

    std::cin>>dollar;

    inr=usd/(1.0/dollar);

    std::cout<<"The indian ruppee for us dollars="<<inr;

    return 0;

}

OUTPUT:




FOR LOOP C++ PROGRAMMING

  NALLAMUTHU GOUNDER MAHALINGAM COLLEGE                   

                           POLLACHI-642001

                                     R.Rasigapriya

                           Bsc Computer Science(Ist Year)

                                         14.For loop

#include <iostream>

int main()

{

   for(int i=1;i<=40;i++)

   {

       std::cout<<"Number::"<<i<<std::end; 

   }

    return 0;

}

OUTPUT:





FOR LOOP C++ PROGRAM

 NALLAMUTHU GOUNDER MAHALINGAM       COLLEGE

                      POLLACHI-642001

                                                   N.DHIVYA

                                 BSC COMPUTER SCIENCE(1st year)

                       14.For Loop

#include <iostream>

int main()

{

    for(int i=1;i<=25;i++)

    {

    std::cout<<"value:"<<i<<std::endl;

    }

    return 0;

}

OUTPUT:






DO WHILE C++ PROGRAMMING

 NALLAMUTHU GOUNDER MAHALINGAM COLLEGE                   

                           POLLACHI-642001

                                     R.Rasigapriya

                           Bsc Computer Science(Ist Year)

                                   13.Do While

#include <iostream>

int main()

{

          int i=0;

    do

    {

                   std::cout<<i<<"\n";

                   i++;

          }

          while(i<=30);

          {

                   std::cout<<"STOP"<<std::endl;

          }

          do

          {

          std::cout<<i<<"\n";

                   i++;

          }

          while(i<=40);

          {

                   std::cout<<"READY"<<std::endl;

          }

          do

          {

                   std::cout<<i<<"\n";

                   i++;

          }

          while(i<=70);

          {

                   std::cout<<"GO"<<std::endl;

          }

          return 0;

}

OUTPUT:



 

 

 

 




DO WHILE C++ program

 NALLAMUTHU GOUNDER MAHALINGAM       COLLEGE

                      POLLACHI-642001

                                                   N.DHIVYA

                                 BSC COMPUTER SCIENCE(1st year)

                             13.Do While

#include <iostream>

int main()

{

   

    int i=0;

    do

    {

        std::cout<<i<<"\n";

        i++;

    }

    while(i<=30);

    {

        std::cout<<"stop"<<std::endl;

    }

    do

    {

        std::cout<<i<<"\n";

        i++;

    }

    while(i<=40);

    {

        std::cout<<"ready"<<std::endl;

    }

    do

    {

        std::cout<<i<<"\n";

        i++ ;

    }

    while(i<=70);

    {

        std::cout<<"go"<<std::endl;

    }

    return 0;

}

OUTPUT:







WHILE LOOP C++ PROGRAMMING

  NALLAMUTHU GOUNDER MAHALINGAM COLLEGE                   

                           POLLACHI-642001

                                     R.Rasigapriya

                           Bsc Computer Science(Ist Year)

                                 12.While loop



#include <iostream>

int main()

{

  int num;

  std::cout<<"Enter the Number:";

  std::cin>>num;

  while(num<=3)

  {

      std::cout<<"The statement is true";

  }

    return 0;

}

OUTPUT:

 



USD TO INR C++ PROGRAMMING

  NALLAMUTHU GOUNDER MAHALINGAM COLLEGE                                                 POLLACHI-642001                                     ...