0

Hi everyone, i'm new here, and also new in InfoTech education (i'm a freshman student)


I don't really know what's the exact word for it, so it's pretty hard for me to search it in this forum but....


can anyone help me out?

how can i use WHILE in reversing numbers..?


say for example....


/*output/

Enter Number: 99873
Number in Reverse is: 37899

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by Sameer.coder
0

Hey,

My first post.

I didnt want to spoonfeed you but its really simple so here it is.
i have made some small errors intentionally which you will be able to fix once you understand the code.

#include <stdio.h>

void myreverse(char pass[21]);

int main(int argc, char  *argv[])
{
	char pass[21];
	strcpy(pass,argv[0]);
	int length = strlen(pass);
	printf("length is %d\n", length);
	myreverse(pass);
    return 0;
}


void myreverse(char pass[21])
{
	int i = 0;
	strrev(pass);
	printf("reversed string is %s\n",pass);
}

Regards
Sameer

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.