혹시 프로그래밍 과제좀 도와주실분 계신가요 (2차원 배열, 구구단,포인터활용등)

talo12의 이미지

1st : 구구단~역구구단 s/w
-2개의 단을 정수(int)로 입력받고, 구구단을 2차원 배열로 계산, 저장 그리고 출력하는 s/w를 구현하시오.
>> ex: 2단~ 7단
>> ex: 7단~ 2단
>> 제한사항: 단수는 2~9의 범위를 갖는다. 0이나 -9나 10과 같은 숫자는 허용되지 않음
>> 단수를 입력할때, 숫자 이외의 입력은 무시하도록 작성한다

- 사용자정의 함수 (인자 : 2차원 배열을 받는 포인터)
>> 사용자정의함수의 인자는 가급적 [2차원 배열의 주소값을 받는 포인터]와 [배열의 길이 값을 전달 받는 int 인자들]로 구성할 것.
>>사용자정의함수로 다음과 같은 기능을 구현할 것: 사용자의 입력을 받음, 구구단 계산, 구구단 계산결과 배열에 저장, 배열 요소들을 출력
2nd : 문자열 비교 함수를 직접 구현해보는 것
- 문자열 두개를 입력받고, 두개의 문자열이 같은지 검사

-평가항목
>> 기능이 확실하게 구현되어야 함
>> main함수는 최대한 간결하고, 명료해야함
>> 사용자정의함수의 이름도 명료해야함
>>주석도 간결하고, 명료하게 구성해야함
>>변수의 이름은 가급적 헝가리안 표기법을 활용할 것

교수님이 과제를 내주셨는데 완전 초보인 저는 너무 어렵네요
밑에처럼 구구단 기틀만 만들었는데 이렇게 만들면 배열값이 바뀌나요?

int main(void)
 
{
 
	int arr[9][9];
 
	int i, j = 0;
	int num, num2 = 0;
 
 
	printf("            저장된 배열은 다음과 같습니다. \n");
 
	for (i = 0; i < 9; i++)
 
	{
 
		for (j = 0; j < 9; j++)
 
		{
 
			arr[i][j] = (i + 1) * (j + 1);
 
			printf("%5d ", arr[i][j]);
 
		}printf("\n");
 
	}
 
	int *prt = arr;
 
	printf("첫번째 입력값: ");
	scanf_s("%d", &num);
	printf("두번째 입력값: ");
	scanf_s("%d", &num2);
 
	for (i = (num - 2); i < (num2 - 1); i++)
 
	{
 
		for (j = 0; j < 9; j++)
 
		{
 
			arr[i][j] = (i + 2) * (j + 1);
 
			printf("%5d ", arr[i][j]);
 
		}printf("\n");
 
	}
 
}

세벌의 이미지

구글에서 C언어 구구단 찾아보면 도움 될 겁니다.
살짝 힌트를 드리면 일단 2단을 만들어 보셔요.
kldp 에서 소스 는 code 태그 안에 넣어야 들여쓰기 살아납니다.
질문은 하나씩.
도움 되시길.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.