Skip to main content

Learn c++ in Tamil | Chapter 3 - Next Level | Beginner to Advance all concepts explained.






// chapter 3

#include <iostream>
#include <string>

int main()
{
    //eg bottle
    //unsign = 0 , +
    /*
    sign ,+ ,- ,0
 
    true   1
    false  0
    boolean
    sizeof()
 
    int - 4 byte
    char  1 byte
    1 byte = 8 bit
 
 
    bit  =  1
    byte =  8bit
    kb   =  8000byte
    mb   =  1024kb
    gb  =   1024mb
    tb  =  1024gb
 
    ascii -:
     a - 97     A - 65 to 90
     b - 98
    c - 99      C  - 67
    f -102
 
    escape sequence
 
 
 
    int a = 4568;
    char b = 'Z'  ;
    bool a1 = true ;
 
 
  std::cout <<b<<"\n"<<a<<"\t"<<a1;
  12 1
  cin white space

  getline(  , )


  //std::string name , name1 , name2 ;



 // std::cin>>name;
  //std::cout<<name;

  //std::cin.ignore(32767 , '\n');

//  std::cin>>name2;
 // std::cout<<name+name2;
  //  std::cout<<"\n"<<name.length();

  //enum data types
  enum Animals
  {
     TIGER ,  //0
     BLACK = 8,  // +1
     ORANGE
  };

  //zoo

  Color first = WHITE ;
  std::cout<<first;


  //struct

  struct Student{
   int id ;
   std::string name;   
  };

  Student s1 ;
  s1.id = 1;
  s1.name= "balu";

  Student s2 = { 2 , "vimal"};
  std::cout<<s1.name;
  std::cout<<s2.name;
  */

  //comtrol flow
  //linear , sequential
  int a = 3, b =5 ;
  //exit(0);
  //std::cout<<a+b;
  //halt
  //jump =  goto , break , continue
  //conditional branching  if() , else
  3

  if(a%2 == 0)
  std::cout<<"a is even";
  else
    std::cout<<"a is odd";

  //even or odd
  //18
  //task 18-,

    return 0;
}





Comments

  1. this is my second c++ coding and this is my assignment work for you.



    #include
    #include

    int main()
    {

    struct Voter{
    int age;
    std::string name;
    };

    Voter v1;
    std::string x;
    int y;
    x=v1.name;
    y=v1.age;
    std::cout << "What is your name? ";
    std::getline(std::cin , x);
    std::cout << "how old are you ";
    std::cin>>y;

    std::cout <<"your name is "<17)
    std::cout<<" and you are eligible for voting."<<"\n" ;
    else
    std::cout<<" and you are not eligible for voting.";
    return 0;

    }

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Bro my vote program

      #include
      int main()
      {
      int age;
      std::cout<<"ENTER YOUR AGE\n";
      std::cin>>age;
      if(18<=age)
      std::cout<<"YOU CAN VOTE 👍";
      else
      std::cout<<"YOU CANNOT VOTE 👎";
      return 0;
      }

      Delete
  2. #include
    #include

    int main()
    {
    struct voter{
    int age;
    std::string name;
    };
    voter v1;
    v1.age=23;
    v1.name="raja";
    voter v2;
    v2.age=17;
    v2.name="rani";
    std::cout<=18)
    std::cout<<"raja is eligible";
    else
    std::cout<<"raja is not eligible\n";
    std::cout<<"\n"<=18)
    std::cout<<"rani is eligible";
    else
    std::cout<<"\nrani is not eligible\n";
    return 0;
    }

    ReplyDelete
  3. #include<
    #include
    using namespace std ;
    int main()
    {
    struct school
    {
    int id;
    string name;
    int age;
    };
    school n1={1,"raj",18};
    cout<<n1.name;
    return 0;
    }
    \\its errors comes but i con't find

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. #include
      #include
      int main()
      {
      enum gender
      {
      MALE,
      FEMALE,
      TRANS
      };
      struct S{
      int age;
      std::string name;
      };
      S s1;
      s1.age=21;
      s1.name="Abinesh";
      std::cout<<s1.name<<"\n"<<s1.age;
      gender first=MALE;
      std::cout<<"\n"<<first;
      if(s1.age<18)
      {
      std::cout<<"\n"<<"he is not elgible to vote";
      }
      else
      {
      std::cout<<"\n"<<"he is elgible to vote";
      }
      if(s1.age%2==0)
      {
      std::cout<<"\n"<<"he can stand in first line";
      }
      else
      {
      std::cout<<"\n"<<"he can stand in second line";
      }
      return 0;
      }

      Delete
  5. #include
    using namespace std;
    int main()
    {
    struct voter
    {
    int age;
    };
    voter v1;

    cout<<"what is your age:"<<"\t";
    cin>>v1.age;
    if(v1.age>=18)
    cout<<"you are eligible for voting";
    else
    cout<<"sorry you are not cacpable for it";


    }

    ReplyDelete
  6. https://www.youtube.com/watch?v=2oWUqaJ9UCk&list=PLxLRoiL22apLLqyXb4KhPM-_rHB8U-HYr&index=3

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. #include
    #include
    using namespace std;

    int main()
    {
    struct student
    {
    string name , name1;
    int age;
    };

    string name , name1;
    float age;
    cout<<"enter ur first name"<<"\n";
    cin>>name;
    cout<<"enter ur last name"<<"\n";
    cin>>name1;
    cout<<"enter ur age"<<"\n";
    cin>>age;

    student s1;
    s1.name= name;
    s1.name1= name1;
    s1.age= age;

    cout<=18)
    cout<<"you are eligible to vote"<<"\t"<<s1.name+name1 <<"\n";
    else
    cout<<"you r not allowed to vote"<<s1.name+name1<<"\n";
    return 0;
    }

    ReplyDelete
  9. Bro this is my first program! All dedication to YOU!
    how is it?

    //Diamond shapeformer

    #include
    #include

    using namespace std;

    int main (){

    int row = 20; // <--| Change the values for the size
    int gap = 20; // <--|-- Be sure to put same values for all!
    int gap2 = 20; // <--| Bigger numbers form bigger size
    int i;

    for (i = 1; i <= row; i += 2){ //For upper triangle structure

    for (int space = 1; space <= gap; space++){ //For front gaps

    cout<<" ";
    }

    for (int j = 1; j <= i; j++){ //For the structure

    cout<<"* "; //The inside particles
    }

    gap -= 2; //Put 1 for right angled triangle
    cout<= row; space--){ //For front gaps

    cout<<" ";
    }

    for (int j = row; j >= i; j--){ //For the structure

    cout<<"* "; //The inside particles
    }

    gap2 += 2; //Put 1 for right angled triangle
    cout<<endl;
    }

    return 0;
    }

    ReplyDelete
  10. #include
    #include


    int main(){
    enum fruits{
    APPLE,
    ORANGE=10,
    PAPAYA
    };
    struct people{
    int age;
    std::string name;
    };
    people p1={ 15 , "bharat"};
    std::cout<17)
    std::cout<<"eligible to vote\n";
    else
    std::cout<<"not eligible to vote\n";
    if(p2.age>17)
    std::cout<<"eligible to vote\n";
    else
    std::cout<<"not eligible to vote\n";
    if(p3.age>17)
    std::cout<<"eligible to vote\n";
    else
    std::cout<<"not eligible to vote\n";

    return 0;
    }

    ReplyDelete
  11. #include
    #include
    int main()
    {
    struct student
    {
    std::string name;
    int age;
    };
    student no1;
    student no1.name=raju;
    student no1.age=16;
    std::cout<<no1.name;
    return 0;
    }
    //bro i can't unterstand my errors pls help me bro

    ReplyDelete
  12. #include
    #include
    int main()
    {
    struct Voters{
    std::string name;
    int age;
    };
    Voters no1;
    std::string name;
    int age;
    no1.name;
    no1.age;
    std::cout<<"what is your name "<<"\n";
    std::cin>>name;
    std::cout<<"what is your age"<<"\n";
    std::cin>>age;
    std::cout<<no1.name;
    return 0;
    }
    // bro no1.name not displaying pls help bro pls

    ReplyDelete
  13. bro i wrote coding for only struct and if and else statement

    #include
    #include

    int main()
    {

    struct voter
    {
    std::string name;
    int age;

    };
    std::cout<<"enter your name and age"
    std::getline

    voter v1={"arjun",20};
    voter v2={"bala",18};
    voter v3={"raju",12};
    std::cout<<v1.name<<"\n"<<v1.age<<"\n";
    std::cout<<v2.name<<"\n"<<v2.age<<"\n";
    if(v1.age<18)
    std::cout<<"v1 is eligble to vote";
    else
    std::cout<<"v1 is not eligble to vote";
    return 0;
    }

    ReplyDelete
  14. #include
    #include
    int main()
    {
    std::string name,name1,add,add1;

    char b ='a';

    std::getline(std::cin,name);
    std::cout<>name1;
    std::cout<>add;
    std::cin>>add1;
    std::cout<>a;
    if (a>=18)

    std::cout<<"you are eligible to vote";
    else
    std::cout<<"you are not eligible to vote";
    return 0;
    }

    ReplyDelete
  15. #include
    #include
    int main ()
    {
    struct vote
    {
    int age;
    std::string name;
    };
    vote v;
    std::cin>>v.age;
    if (v.age>=18)
    std::cout <<"you are eligible to vote";
    else
    std::cout<<"you are not eligible to vote";
    return 0;


    }

    ReplyDelete
  16. #include
    #include
    int main(){

    struct People
    {
    std::string name;
    int age;
    };

    People p1;
    std::cout<<"your name\n"; std::getline(std::cin,p1.name);
    std::cout<<"your age\n";
    std::cin>>p1.age;
    if(p1.age>=18)
    std::cout<<p1.name<<" "<<"you are eligible for voting.";
    else
    std::cout<<p1.name<<" "<<"your are only"<<" "<<p1.age<<" "<<" years old"<<" "<<"under the INDIAN CONSTITUTION only the people vote, who finished 17 years.So you can wait for"<<" "<< 18-p1.age<<" "<< "years to vote.";
    return 0;
    }

    ReplyDelete
  17. // Online C++ compiler to run C++ program online
    #include
    #include
    using namespace std;
    int main() {
    string name;
    int age;
    cout<<"what is your name:";
    getline(cin,name);
    cout<<"what is your age:";
    cin>>age;
    //exit(0);
    if (age>18)
    cout<<"you can eligible to vote";
    else
    cout<<"you can't eligible to vote";


    return 0;
    }

    ReplyDelete
  18. #include
    #include
    int main()
    {
    struct voter{
    int age;
    std::string name;
    };
    voter a1;
    std::string arun;
    int 18;
    arun=a1.name;
    18 =a1.age;
    std::cout<<"what is your name?";
    std::getline(std::cin , arun);
    std::cout<<"how old are you?";
    std::cin>> 18;

    std::cout<<"your name is"<17)
    std::cout<<"and your eligible for voting."<<"\n";
    else
    std::cout<<"your not eligible for voting.";
    return 0;

    ReplyDelete
  19. #include
    #include
    using namespace std;
    int main() {
    string name;
    int age;
    cout<<"what is your name:";
    getline(cin,name);
    cout<<"what is your age:";
    cin>>age;
    //exit(0);
    if (age>=18)
    cout<<"you can eligible to vote";
    else
    cout<<"you can't eligible to vote";


    return 0;
    }

    ReplyDelete

Post a Comment

Popular posts from this blog

Get Ethical Hacking Project #1

Thanks for your interest in our course This is a paid course, 150 rs for Indian people, 5$ for international people Instructions to get course: Indian people can get the course by paying using this UPI id   tamilhacks@ybl  (KARTHIKEYAN T) send 150 Rs to this upi id with subject bug bounty and after payment take a screenshot and send that to email id tamilhackstech@gmail.com - you will get the course within 24 hours. (there will be no tax, when paying using upi id)     The above mentioned method is most preferable. if you don't have a upi id app, install  phonepe  or  google pay   app and register there and pay easily  or  pay here using the alternate method to get this course, this link cost 18% gst for the course . (nearly 30-100 Rs for tax and other charges here )   After payment you will receive a payment confirmation mail along with a downlink for the course, you can download the course file using that . the course is in zip format, so after downloading the file extra

Learn c++ in Tamil | Complete guide and tutorial | Beginner to Advance all concepts explained.

hi guys welcome , all the coding used in video are available here : /* hi guys welcome to learn c++ in tamil what is C++ how what software your own program schools,clg,institute.... start 1.interest 2.patience 3.fun 4.practise computer program - app - programming source code - hardware - fb running , executing machine language :  101010 assembly lang : mov h1; high lang : c , c++....java , js , python  eg :  a+b .....1001010  compiler :  human to machine              machine to human  rules :  a+b;  usage:  games, manufacturing , embedded , finance , graphics , etc...  Guide: 1.problem 2.solution - alternative 3.program  - C++ 4.compile  - turboc , ide , codeblocks , cmd 5.result   - library file - linker : #include<iostream.h>    input , output std::cout<<"welcome";   standard character out << " "; primary section : 1.statements   ;  end 2.functions   main() 3.syntax  , syntax error pra

Get Bug Bounty Course

Thanks for your interest in our course Limited Offer This is a paid course, Rs 10000 ,Rs 1000  for Indian people, 75$ 15$ for international people , 50$ 10$ for Srilankan people Instructions to get course: Indian people can get the course by paying using this UPI id  tamilhacks@ybl  send 1000 Rs to this upi id with subject bug bounty and after payment take a screenshot and send that to email id tamilhackstech@gmail.com - you will get the course within 24 hours. (there will be no tax, when paying using upi id)    The above mentioned method is most preferable. if you don't have a upi id app, install phonepe or google pay   app and register there and pay easily  or  pay here using the alternate method to get this course, this link cost 18% gst for the course . (nearly 30-100Rs for tax and other charges here ) After payment you will receive a payment confirmation mail along with a downlink for the course, you can download the course file using that. As for international peopl