Character Predictor in C++

#include<iostream>
using namespace std;
int main()
{
char a=NULL;
int aa=0;

cout<<"Infinite character Predicator in C++"<<endl;
cout<<"Press 00 for exist 11 for continue "<<endl;
while(1)
{
cout<<"Enter Character =";
cin>>a;
if(a>=32 && a<=47)
{
cout<<"you have eneterd special charater with the Ascii Value="<<int(a)<<endl;
}
if(a>=48 && a<=57)
{
cout<<"you have eneterd Digits charater with the Ascii Value="<<int(a)<<endl;
}
if(a>=58 && a<=63)
{
cout<<"you have eneterd Relational Operators charater with the Ascii Value="<<int(a)<<endl;
}
if(a>=65 && a<=90)
{
cout<<"you have eneterd Capital A-Z charater with the Ascii Value="<<int(a)<<endl;
}
if(a>=90 && a<=122)
{
cout<<"you have eneterd Small a-z charater with the Ascii Value="<<int(a)<<endl;
}
if((a>=91 && a<=96) || (a>=123 &&  a<=127))
{
cout<<"you have eneterd Brackets and ' '_ charater with the Ascii Value="<<int(a)<<endl;
}

cout<<"Want ot Exist press 00=";
cin>>aa;
if(aa==00)
{
  break;
}



}



system("pause");

return 0;
}

13 Comments

  1. Question 5:
    ALGORITHM
    1. Start the program
    2. Initialize character
    3. Initialize integer
    4. Print Infinite character Predicator in C++
    5. Print Press 00 for exist 11 for continue
    6. Make infinite loop
    7. Print Enter Character
    8. Take input in char
    9. If given character is greater than or equal to 32 and if the character smaller or equal to 47
    10. Print you have entered special character with the Ascii Value
    11. If given character is greater than or equal to 48 and if the character smaller or equal to 57
    12. Print you have entered Digits character with the Ascii Value
    13. If given character is greater than or equal to 58 and if the character smaller or equal to 63
    14. Print you have entered Relational Operators character with the Ascii Value
    15. If given character is greater than or equal to 65 and if the character smaller or equal to 90
    16. Print you have entered Capital A-Z character with the Ascii Value
    17. If given character is greater than or equal to 90 and if the character smaller or equal to 122
    18. Print you have entered Small a-z character with the Ascii Value
    19. (If given character is greater than or equal to 91 if smaller or equal to 96) or
    20. (If given character is greater than or equal to 123 if smaller or equal to 127)
    21. Print you have entered Brackets and character with the Ascii Value
    22. Print want to Exist press 00
    23. Take input in integer
    24. If integer =00
    25. Stop the loop
    26. End the program

    NAME: FAIZAN AHMED
    CMS:406201
    A2

    ReplyDelete
  2. m sameer sohail
    406423
    ALGORITHM
     Initialize character
     Initialize integer
     Print Infinite character Predicator in C++
     Print Press 00 for exist 11 for continue
     While (condition)
     Print "Enter Character ="
     If it is greater than or equal to 32 and smaller than or equal to 47
     Print you have entered special character with the Ascii Value=
     If it is greater than or equal to 48and smaller than or equal to 57
     Print you have entered Digits character with the Ascii Value
     If it is greater than or equal to 58 and smaller than or equal to 63
     print" you have entered Relational Operators character with the Ascii Value="
     If it is greater than or equal to 65and smaller than or equal to 90
     print" you have entered Capital A-Z character with the Ascii Value=
     If it is greater than or equal to 90 and smaller than or equal to 122
     print" you have eneterd Small a-z charater with the Ascii Value="
     if it is greater and equal to 91 and less then equal to 96 or it is greater then or equal to 123 and less then equal to 127
     print" "you have eneterd Brackets and ' '_ charater with the Ascii Value="
     Print Want ot Exist press 00
     If a is equal to is equal to 00
     Break statement

    ReplyDelete
  3. Question 5:
    ALGORITHM
    1. Start the program
    2. Initialize character
    3. Initialize integer
    4. Print Infinite character Predicator in C++
    5. Print Press 00 for exist 11 for continue
    6. Make infinite loop
    7. Print Enter Character
    8. Take input in char
    9. If given character is greater than or equal to 32 and if the character smaller or equal to 47
    10. Print you have entered special character with the Ascii Value
    11. If given character is greater than or equal to 48 and if the character smaller or equal to 57
    12. Print you have entered Digits character with the Ascii Value
    13. If given character is greater than or equal to 58 and if the character smaller or equal to 63
    14. Print you have entered Relational Operators character with the Ascii Value
    15. If given character is greater than or equal to 65 and if the character smaller or equal to 90
    16. Print you have entered Capital A-Z character with the Ascii Value
    17. If given character is greater than or equal to 90 and if the character smaller or equal to 122
    18. Print you have entered Small a-z character with the Ascii Value
    19. (If given character is greater than or equal to 91 if smaller or equal to 96) or
    20. (If given character is greater than or equal to 123 if smaller or equal to 127)
    21. Print you have entered Brackets and character with the Ascii Value
    22. Print want to Exist press 00
    23. Take input in integer
    24. If integer =00
    25. Stop the loop
    26. End the program
    Syed Muhammad Raza Shamsi
    CMS: 407291

    ReplyDelete
  4. Question 5:
    ALGORITHM
    1. Start the program
    2. Initialize character
    3. Initialize integer
    4. Print Infinite character Predicator in C++
    5. Print Press 00 for exist 11 for continue
    6. Make infinite loop
    7. Print Enter Character
    8. Take input in char
    9. If given character is greater than or equal to 32 and if the character smaller or equal to 47
    10. Print you have entered special character with the Ascii Value
    11. If given character is greater than or equal to 48 and if the character smaller or equal to 57
    12. Print you have entered Digits character with the Ascii Value
    13. If given character is greater than or equal to 58 and if the character smaller or equal to 63
    14. Print you have entered Relational Operators character with the Ascii Value
    15. If given character is greater than or equal to 65 and if the character smaller or equal to 90
    16. Print you have entered Capital A-Z character with the Ascii Value
    17. If given character is greater than or equal to 90 and if the character smaller or equal to 122
    18. Print you have entered Small a-z character with the Ascii Value
    19. (If given character is greater than or equal to 91 if smaller or equal to 96) or
    20. (If given character is greater than or equal to 123 if smaller or equal to 127)
    21. Print you have entered Brackets and character with the Ascii Value
    22. Print want to Exist press 00
    23. Take input in integer
    24. If integer =00
    25. Stop the loop
    26. End the program
    Syed Muhammad Raza Shamsi
    CMS: 407291

    ReplyDelete
  5. Algorithm:
    1) Print “Infinite character Predictor in C++”.
    2) Print “Press 00 for exist 11 for continue ".
    3) Taking while loop if 1 so continue and if 0 so end.
    4) Read character
    5) Check If the ASCII of entered character is greater than or equal to 32 and less than or equal to 47.
    6) So display "you have entered special character with the ASCII Value"
    7) Check If the ASCII of entered character is greater than or equal to 48 and less than or equal to 57.
    8) So display "you have entered Digits character with the ASCII Value"
    9) Check If the ASCII of entered character is greater than or equal to 58 and less than or equal to 63.
    10) So display “you have entered Relational Operators character with the ASCII Value”.
    11) Check If the ASCII of entered character is greater than or equal to 65 and less than or equal to 90.
    12) So display "you have entered Capital A-Z character with the ASCII Value".
    13) Check If the ASCII of entered character is greater than or equal to 90 and less than or equal to 122.
    14) So display "you have entered Small a-z character with the ASCII Value".
    15) Check if the ASCII code of entered character is greater than or equal to 91 and less than or equal to 96 or greater than or equal to 123 and smaller than or equal to 127.
    16) So display "you have entered Brackets and ' '_ character with the ASCII Value".
    17) Display program exists or continue option by using 0 and 1.
    18) If the user enters 0 so the program will terminate otherwise the program will be repeated.
    NAME: Sarmad Hassan
    CMS# 406324
    Section: A 2

    ReplyDelete
  6. Q:Determine the infinite character by using ASCI table?
    Alogarithm:
    Step 1:Input the infinite character predictator in C++.
    Step 2:Input the special and digital character from ASCI table.
    Step 3:Take capital A-Z character from ASCI table with condition.
    Step 4:Read small a-z character from ASCI table with condition.
    Step 5:Enter the bracket and “ “ character from ASCI table.
    CMS NUMBER
    406016

    ReplyDelete
  7. Algorithm

    I. Print “Infinite character Predictator in C++”.
    II. Print “Press 00 for exit 11 for continue ".
    III. Take while loop if it is 1 so continue and if it is 0 so end.
    IV. Read character
    V. Check If the ASCII of entered character is greater than or equal to 32 and less than or equal to 47.
    VI. Then display "you have entered special character with the ASCII Value"
    VII. Check If the ASCII of entered character is greater than or equal to 48 and less than or equal to 57.
    VIII. Then display "you have entered Digits character with the ASCII Value"
    IX. Check If the ASCII of entered character is greater than or equal to 58 and less than or equal to 63.
    X. Then display “you have entered Relational Operators character with the ASCII Value”.
    XI. Check If the ASCII of entered character is greater than or equal to 65 and less than or equal to 90.
    XII. Then display "you have entered Capital A-Z character with the ASCII Value".
    XIII. Check If the ASCII of entered character is greater than or equal to 90 and less than or equal to 122.
    XIV. Then display "you have entered Small a-z character with the ASCII Value".
    XV. Check if the ASCII code of entered character is greater than or equal to 91 and less than or equal to 96 or greater than or equal to 123 and smaller than or equal to 127.
    XVI. Then display "you have entered Brackets and ' ' character with the ASCII Value".
    XVII. Then Display program exits or continue option by using 0 and 1.
    XVIII. If the user enters 0 then only the program will terminate otherwise the program will be repeated.

    CMS -- 405839

    ReplyDelete
  8. Algorithm:
    1-Start of program
    2-Declaring character type variable
    3-Declaring integer type variable
    4-print out "Infinite character predictor in C++"
    5-print out "Press 00 for exist 11 for continue"
    6-Using while loop to crate infinite loop
    7-Print out "Enter Character ="
    8-To take input from user
    9-Use if statement inside while loop
    10-print out"you have entered special character with the ASCII Value=" if value of "a" is from 32 to 47
    11-print out"you have entered Digits character with the ASCII Value=" if value of "a" is from 48 to 57
    12-print out"you have entered Relational Operators character with the ASCII Value=" if value of "a" is from 58 to 63
    13-print out"you have entered Capital A-Z character with the ASCII Value=" if value of "a" if from 65 to 90
    14-print out"you have entered Small a-z charter with the ASCII Value=" if value of "a" is from 90 to 122
    15-print out"you have entered Brackets and ' '_ character with the ASCII Value=" if (a>=91 && a<=96) or (a>=123 && a<=127
    16-print out"Want to Exist press 00="
    17-take input from user
    19-if a=00 break the loop to exit it
    20-use system pause to exit and stop the code from running
    21-End program

    ReplyDelete
  9. Algorithm for character predicator:

    1)Print title of the program.
    Print instructions for continue or terminate a loop.
    2)Taking while loop 1 for continues or 0 for terminate or exist.
    3)Input character.
    4)If the ASCII of character is greater than equal to 32 and less than equal to 47.
    5)Then print you have entered special character with its ASCII Value.
    6)If the ASCII of character is greater than equal to 48 and less than equal to 57.
    7)Then print you have entered Digits character with its ASCII Value.
    8)If the ASCII of character is greater than equal to 58 and less than equal to 63.
    9)Then print you have entered Relational Operators character with its ASCII Value.
    10) If the ASCII of character is greater than equal to 65 and less than equal to 90.
    11)Then print you have entered Capital A-Z character with the ASCII Value.
    12)If the ASCII of character is greater than equal to 90 and less than equal to 122.
    13)Then print you have entered Small a-z character with its ASCII Value.
    14) If the ASCII code of character is greater than equal to 91 and less than equal to 96 OR greater than equal to 123 and smaller than equal to 127.
    15)Then print you have entered Brackets and ' '_ character with its ASCII Value.
    16)Then print options of continue or exist.
    17)If the user enter 0 the loop will terminate.
    18)If the user enter 1 the loop will be repeated.

    Madni Fareed
    CMS# 406323
    A2

    ReplyDelete
  10. ALGORITHM:
    1: declare a character named ”a”
    2: declare a integer named “aa”
    3: print “infinite character Predicator in C++”
    4: print “00 for exist 11 for continue”
    5: make a while loop
    6: print “Enter a character”
    7: input “a”
    8: if the given character is greater than or equal to 32 and is lesser or equal to 47
    9 : print “you have enter a special a character with ascii value
    10 : if the given character is greater or equal to 48 and lesser or equal to 57
    11: : print “ you have entered a digits character with the ascii value
    12: if the given character is greater or equal to 58 and lesser or equal to 63
    13 : print “ you have entered a rational operator character with the ascii value
    14: if the given character is greater or equal to 65 and lesser or equal to 90
    15 : print “ you have entered a capital A to Z character with the ascii value
    16 : if the given character is greater or equal to 90 and lesser or equal to 122
    17 : : print “ you have entered a small a to z character with the ascii value
    18 : : (if the given character is greater or equal to 91 and lesser or equal to 96)or ( if the given character is greater or equal to 123 and lesser or equal to 127)
    19 : print you have entered brackets and character with the ascii value
    20 : print want to exit press 00
    21: take input of “aa”
    22: if aa equal to 00
    23: end program

    Name :laiq Ahmed
    cms : 406985
    section A2 :)

    ReplyDelete
  11. Question#5 Algorithm
    1. Start the program.
    2. Initialize the all characters.
    3. Initialize all integers.
    4. Print the infinite character in program.
    5. Print and press 00 exist 11 for continue.
    6. Make the infinite loop.
    7. Print Enter Character.
    8. Take input in character.
    9. If given character is greater than or equal to 32 and if the character smaller or equal to 47.
    10. Print special character with ASCII value.
    11. If given character is greater than or equal to 48 and if the character smaller or equal to 57.
    12. Print special character with ASCII value.
    13. If given character is greater than or equal to 58 and if the character smaller or equal to 63.
    14. Print special character with ASCII value.
    15. If given character is greater than or equal to 65 and if the character smaller or equal to 90.
    16. Print the Capital A-Z characters with ASCII value.
    17. If given character is greater than or equal to 90 and if the character smaller or equal to 122.
    18. Print the Small a-z characters with ASCII value.
    19. Print want to express 00.
    20. Take input in integer.
    21. If integer=00
    22. Stop the loop.
    23. End of program.
    Name:Muhammad Mohid Mustafa
    CMS:406599
    Section:A1

    ReplyDelete

Post a Comment

Previous Post Next Post