Results 1 to 4 of 4

Thread: char datatype main integer enter karna

  1. #1
    noumanmugel's Avatar
    noumanmugel is offline Senior Member+
    Last Online
    16th October 2018 @ 01:14 AM
    Join Date
    21 Aug 2009
    Location
    Lahore
    Posts
    65
    Threads
    6
    Credits
    980
    Thanked: 1

    Post char datatype main integer enter karna

    friendx koi bata sakta hai k jab hum char datatype main integer enter karty hain tou loop chalna shoro ho jati kaya is ka kisi k pass solution hai k aghar hum char data type main interger add karien tou loop na chalay balky eror day ...
    like..
    char a;
    cout<<"Enter char";
    cin>>a;
    if i enter 1 ;
    out put asay aey..

    enter again...

  2. #2
    Shoukat_Bj's Avatar
    Shoukat_Bj is offline Senior Member+
    Last Online
    21st September 2013 @ 10:00 PM
    Join Date
    16 Jul 2013
    Location
    KpK Bajaur
    Age
    32
    Gender
    Male
    Posts
    67
    Threads
    2
    Credits
    0
    Thanked
    3

    Default

    #include<conio.h>
    #include<iostream.h>
    void main(void)
    {
    clrscr();
    char a;
    cin>>a;
    if (a >= '0' && a <= '9')
    {
    cout<<"try again";
    }
    getch();
    }
    Last edited by Shoukat_Bj; 26th July 2013 at 01:35 PM. Reason: mistake

  3. #3
    Shoukat_Bj's Avatar
    Shoukat_Bj is offline Senior Member+
    Last Online
    21st September 2013 @ 10:00 PM
    Join Date
    16 Jul 2013
    Location
    KpK Bajaur
    Age
    32
    Gender
    Male
    Posts
    67
    Threads
    2
    Credits
    0
    Thanked
    3

    Default

    Dowao ma yaad rakna

  4. #4
    Shoukat_Bj's Avatar
    Shoukat_Bj is offline Senior Member+
    Last Online
    21st September 2013 @ 10:00 PM
    Join Date
    16 Jul 2013
    Location
    KpK Bajaur
    Age
    32
    Gender
    Male
    Posts
    67
    Threads
    2
    Credits
    0
    Thanked
    3

    Default swaf two variable with out 3rd variable

    #include<iostream.h>
    Void main(void)
    {
    Int a,b;
    a = 10;
    b = 20;
    a = a+b;
    b = a-b;
    a = b-a;
    Cout<<"Now the value of a="<<a<<"nd the value of b is"<<b;
    getch();
    }

Similar Threads

  1. Woh Boli, Darrd Ke Us Paar Bhi Eik Dard Hota Hai...
    By Aspirant in forum Roman Urdu Poetry
    Replies: 26
    Last Post: 14th September 2020, 07:00 PM
  2. Replies: 3
    Last Post: 10th November 2013, 10:57 AM
  3. Ibn'eIn sha @};-
    By szaib in forum Urdu Adab & Shayeri
    Replies: 2
    Last Post: 25th November 2010, 05:17 AM
  4. Mobile Phone Secrets & Tricks
    By tahseenrajput in forum General Mobile Discussion
    Replies: 11
    Last Post: 28th January 2009, 03:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •