School project

Hey to the people out there. I need help with my school project due on 03/06. I've got my codes all done out, but its copied from a friend of mine and I have done some modifications to it. However, I need to do more modifications to it so that my project will not look similar to my friend's. Help me out guys.

#include<stdio.h>
#include<stdlib.h>
#include<conio.h> // needed for getch() and getche() functions
#include<string.h>
char blog[5000]; // declaration of character array


void intropage(); // declare introPage function of void type
void mainmenu();
void blogentry();
void blogdisplay(int length);
void BlogLength(int length);
void blogcaseconvert(int length);

int main()
{
intropage(); // call function
mainmenu();
return 0; // terminate the program
}


void intropage()
{
printf("\t\tComputer Programming Mini Project Part1\n");
printf("\t\t---------------------------------------\n");
printf("Module Group: EG1005 AC\n");
printf("Task & Members:\n\n");
printf("\tBlogEntry -----> ShermanKoh(080678H)\n");
printf("\tBlogDisplay -----> ShermanKoh(080678H)\n");
printf("\tBlogLength -----> ShermanKoh(080678H)\n");
printf("\tBlogCaseConvert -----> ShermanKoh(080678H)\n\n");

_sleep(3000); // delay for 3 second


}

void mainmenu()
{
int choice =0;
int bloglength;
do{
system("cls"); //to clear screen
printf("\t\tComputer Programming Mini Project Part 1\n");
printf("\t\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
printf("MainMenu:\n\n");
printf("\t1. BlogEntry\n");
printf("\t2. BlogDisplay\n");
printf("\t3. BlogLength\n");
printf("\t4. BlogCaseConvert\n");
printf("\t5. ExitProgram\n\n");
printf("\tPlease input your selection:\n\n");
choice = getch();
if(choice == 49) // checks whther entered character is 49
{
printf("BlogEntry Chosen\n\n");
blogentry();
bloglength = strlen(blog);
} //end of for loop
if(choice == 50) // if (choice == 2)blogDisplay();
{
printf("BlogDisplay Displayed\n\n");
blogdisplay(bloglength);
}
if(choice == 51)
{
printf("BlogLength Chosen\n\n");
BlogLength(bloglength);
}
if(choice == 52)
{
printf("BlogCaseConvert Converted\n\n");
blogcaseconvert(bloglength);
}
if(choice == 53)
{
printf("Exiting Program..\n\n");
_sleep(1000);
break; // to close window
system("pause");
}
if(choice <49 || choice >53) //Unknown option
{
printf("\tWrong selection entered\n");
printf("\tPlease Try Again!\n\n");
system("pause");
}
}while (choice != 55);
}

void blogentry() //define function
{
char choice; // variable declaration
do
{
system("cls");
printf("BlogEntry\n");
printf("---------\n");
printf("Please enter Blog below, then press [enter]\n"); //Message to the user
printf("*******************************************\n");
gets(blog);
printf("______________________________________________________\n");
printf("Are you sure? Still want to make anymore changes?(Y/N) ");
printf("\n\n");
choice = getch();
}while (choice != 110 && choice != 78);
}

void blogdisplay(int length)
{
system("cls");
printf("BlogDisplay\n");
printf("-----------\n");

for(int i = 0; i<length; i++)
{
printf("%c", blog[i]);

}
printf("\n\n");
printf("_________________________________\n");
system("pause");
}
void BlogLength(int length)
{
system("cls");
printf("BlogLength\n");
printf("----------\n\n");
for(int i = 0; i<length; i++)
{
printf("%c", blog[i]);
_sleep(20);
}
printf("\n\n");
printf("This blog is %d in length and uses %d byte(s) of memory\n\n", length, length);
system("pause");
}
void blogcaseconvert(int length)
{
system("cls");
printf("BlogCaseConverter\n");
printf("-----------------\n\n");
printf("InputBlog:\n");
for(int i = 0; i<length; i++)
{
printf("%c", blog[i]);
_sleep(20);
}
printf("\n\n");
printf("OutputBlog:\n");
for(int i = 0; i<length; i++)
{
if(blog[i] >=97 && blog[i] <=122)
{
blog[i]=blog[i]-32;
}
}
for(int i = 0; i<length; i++)
{
printf("%c", blog[i]);
_sleep(20);
}
printf("\n\n");
system("pause");
}


thanks to people who will be helping. thanks a million in advance.
Last edited on
Have a go at making the changes yourself. If they don't work, come back and ask for help fixing it. We won't help you cheat, sorry.
closed account (z05DSL3A)
Sherman wrote:
However, I need to do more modifications to it so that my project will not look similar to my friend's. Help me out guys.


You seriously want people to waist there time helping you cheat?
alright. my aplogy. Now i would like to ask, in my above. The moment i make my selection, my selected screen appears. Where do i have to input e.g, blog entry has been selected." ?
meaning i would like "Blog entry has been selected" before my screen changes.
It would be easier to reference specific lines of code if you put your code in code tags, but I will do the best I can. Since the function call to blogentry() immediately clears the screen, you won't see the "Blog Entry Chosen" message from the mainmenu() function. One way to change this would be to put the message in the blogentry() function itself, after the command to clear the screen. Another option would be to request that the user "Press any key to continue" and include a call to getch() in the mainmenu() function, after the option has been selected.
Topic archived. No new replies allowed.