Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Penguinzchaseme

code problem

This topic is 5561 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
Not only that, but you forgot source tags and the code was ruined. And you haven''t really told us what the problem is.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!