#include<iostream> using namespace std; int ascc(int n,int prev); int ascc1(int n); int ascc2(int n); int main() { int i,j,k,l,m,asc,ch1,ch2; char c; printf("Enter a character:"); cin>>c; int as=c; for(i=1;i<=5;i++) { for(j=1;j<=5-i;j++) { cout<<" "; } ch1=as-4; for(k=1;k<=i;k++) { cout<<(char)ascc(ch1,as); ch1++; } ch2=ch1-2; for(l=1;l<i;l++) { cout<<(char)ascc(ch2,as); ch2--; } cout<<"\n"; } } int ascc(int n,int prev) { if(prev>=65&&prev<=90) return(ascc1(n)); else return(ascc2(n)); } int ascc1(int n) { if((n>=65 && n<=90)||(n>=97&&n<=122)) return(n); else if(n<65) return(n+26); else if (n>122) return(n-26); else if (n>90 && n<95) return(n-26); else if(n>=93 && n<97) return(n+26); } int ascc2(int n) { if((n>=65 && n<=90)||(n>=97&&n<=122)) return(n); else if(n<65) return(n+26); else if (n>122) return(n-26); else if(n>=93 && n<97) return(n+26); }
ANSWER IN C PLEASE (: ew History Bookmarks Window Help 13.16. Loops E ry> ECE 270...
In C programming language have a program request the user to enter an uppercase letter. Use nested loops to produce a pyramid pattern like this: The pattern should extend to the character entered. For example, the preceding pattern would result from an input value of E. Hint: Use an outer loop to handle the rows. Use three inner loops in a row, one to handle the spaces, one for printing letters in ascending order, and one for printing letters in...
I need help with this assignment in C++, please! *** The instructions and programming style details are crucial for this assignment! Goal: Your assignment is to write a C+ program to read in a list of phone call records from a file, and output them in a more user-friendly format to the standard output (cout). In so doing, you will practice using the ifstream class, I'O manipulators, and the string class. File format: Here is an example of a file...