GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: No Line Numbers


A Paste by Upper
1
 
#include <iostream.h>
char Upper(char a){
    int UP[26],m=0;
    for(int i=65;i<=90;i++){
        UP[m]=i;
        m++;
    }
    m=0;
    for (char n='a';n<='z';n++){
        if(a==n) break;
        m++;
    }
    return char(UP[m]);
}
void main(){
    char a='z';
    a=Upper(a);

    cout<<a;
}