Win a copy of Java Challengers this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

can't figure it out what to do in my code

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've posted few days ago about a problem I'm facing but i'm currently still stuck on it and can't figure it out what to do,
I have this exercise where I must use in it a recursion function that get input from reading a file and then for each alphabetic letter in the file it should turn it to the previues alphabet by 2 ( for example c becomes a, and a becomes y ...) and it should reverse the letters (abc -->yza) but i still can't figure out hot to do all of this and I also must use printf only in the main function to print the results

Note: there are symbols and numbers when reading the file and they shouldn't appear when printing the results,

now here are the codes that i tried to figure out my problem but they didn't help me:
Note : its a code in "C programming " but can't find the tag for c programming and it's my first time on the webstie
the first code :  
Note : in this code I only succesfully did make the letters change from one to another (c-->a,a-->y)


the seconde code that i tried :
Note: in this one I successfully reversed the letters but can't get my way around making a to become y and can't make an if statement that only make the program print the letters
 
permaculture is a more symbiotic relationship with nature so I can be even lazier. Read tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic