A Thread for Programmers.!

Core

Member
Jan 23, 2010
3,120
195
0
Milky Way/Local Cluster/Local Sol/Earth
Alright I made this thread for programmers if you are one of them then you can participate to this unless don't bother to come here cause if this thread fill with full of craps and chats ,other people may not be able to find posts regarding to this topic.

this is what you should do.!
I post a Problem First you need to solve it ,then after solved put the codes and the final output between

Code:
here codes tags
so people can easily read and recognize them.also you can put problems and and let other people to solve it,put as long as problems if you can ,but it's upto you and I am not going to interfere with it ,if you got any trouble u need to contact the related problem poster not thread owner

don't copy paste problems directly from other website cause it will lead to find answers more easily ,I suggest instead you need to edit the problem by yourself then put that here.

example if there is any multiplications then you can edit it to additions
likewise ,in summary just edit and put here.

you can use any language (including scripts)
but I recommend
C,C++,Java,Basic,or any .NET Language(C#,J#,C++/CLI,VB.NET,F#,ASP.NET),PHP,JavaScript,VBScript,ASP,Perl,Python,Ruby,or anything < ,I don't know there are lot of languages but since all languages are used for interactive with machines and solve problems it doesn't really matter.

---------------------------------------------------------------------


This is my first Problem

Code a program to read characters and count the vowels and count consonants from keyboard as well then you need to separate both in columns . stop
counting when it reaches a X or it's simple is encountered.

(Use Console to run this on,Don't use a GUI.!!)
 

Core

Member
Jan 23, 2010
3,120
195
0
Milky Way/Local Cluster/Local Sol/Earth
People in Elakiri first need learn English :P
Did I ever say.?/ solve this for me.??

Just read this part

"so people can easily read and recognize them.also you can put problems and and let other people to solve it,put as long as problems if you can ,but it's upto you and I am not going to interfere with it ,if you got any trouble u need to contact the related problem poster not thread owner

don't copy paste problems directly from other website cause it will lead to find answers more easily ,I suggest instead you need to edit the problem by yourself then put that here."
 

Core

Member
Jan 23, 2010
3,120
195
0
Milky Way/Local Cluster/Local Sol/Earth
The Answer to First Question.!
Now it's your turn ;
according to what I said early.!


Code:
/*
This is my first Problem in ISO/IEC C++
Code a program to read characters and count the vowels and count consonants from keyboard as well then you need to separate both in columns . stop
counting when it reaches a X or it's simple is encountered.

(Use Console to run this on,Don't use a GUI.!!) 
*/

#include <iostream>

using std::endl;
using std::cout;
using std::cin;

int main()
{
    char character;
    int i=0;
    int countVowls = 0;
    int coutConsts = 0;

    for(;;)
    {
        cout << endl;
        cout << "Type any character to proceed" << endl;
        cin >> character;

        if('x' == character || 'X' == character) //Stop when type X or x
        {
            break;
        }

        switch(character)
        {
            case 'a' : case 'A': 
            case 'e' : case 'E': 
            case 'i' : case 'I': 
            case 'o' : case 'O': 
            case 'u' : case 'U':
                countVowls++;
                break;
            default:
                coutConsts++;
                break;
        }

    }

    cout << "Number of Vowels : " <<  countVowls << " || and Consonant : " << coutConsts << endl; //Seperate both in Columns
    cin >> i;
    return 0;
}
 

¤--bACarDi--¤

Well-known member
  • Jan 9, 2009
    12,130
    288
    83
    124.43.xxx.xxx
    well here it is,

    eg1:
    Enter String: 123 <- user enters
    and it prints,
    123
    321
    213
    132
    231
    312

    for any number or string that user inputs!!

    eg 2:
    Enter String: abc
    it prints...
    abc
    cba
    bca
    acb
    bac
    cab

    Do the Algo :D