code problem

Started by
1 comment, last by Penguinzchaseme 20 years, 11 months ago
This code multiplies the number of each letter in a string(a=1 z=26) and checks to see if the modulus of each string divided by 47 is equal. #include <iostream> using namespace std; int main() { char alpha[27]="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char UFO[7], Group[7]; int n, x, y, z, a, b=1, c=1; cin>>UFO[7]; cin>>Group[7]; for(n=0; alpha[n];n++); { for(x=0;UFO[x];x++){ if(UFO[x]=alpha[n])UFO[x]=n+1; } for(y=0;Group[y];y++) if(Group[y]=alpha[n])Group[y]=n+1; } for(z=0;UFO[z];z++){ b=b*UFO[z]; } for(a=0;GroupLink
When Penguins are chasing you, resistance is futile, give into their demands and they may spare you
Advertisement
don''t crosspost, dammit!
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
Not only that, but you forgot source tags and the code was ruined. And you haven''t really told us what the problem is.

This topic is closed to new replies.

Advertisement