0 like 0 dislike
3.1k views

Please write a program, including function(s), that receives one input number, then shows the squared value of the input.

Input 1

10

Output 1

10
100

Input 2

12

Output 2

12
144

[Exercise] Coding (C) - asked in Chapter 3: Branching, Looping and Functions by (5.9k points)
ID: 39810 - Available when: Unlimited - Due to: Unlimited
| 3.1k views

16 Answers

0 like 0 dislike
Hidden content!
#include *** **** *
#include * ** ** ** *

int * **
void **** * number);

int main(int argc, char *argv[])
{
** * * * * *
****** ******* a;
** * * * *** * = ** ********
*** *** **
* ** ***** * **

* * * ** *** * * 0;
}

void * number){
** ***** * ** *** ** * * **** * * *** * * ** ***
** *** ** * * * * * * ** * ****
}

int *** * **
* ** * ** * * * ** ** * x;
*** ** ** * ** * *** * ** * * * ****** * **
**** *** **** ********** *** ** x; * * * ** **
}
100/100 answered by (271 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include * * * * ***
#include *** * **** * ***

int * ** *
void * ** * * number);

int main(int argc, char *argv[])
{
*** ******
**** **** a;
**** **** * = ** ** **
*
* * * ** ** *
* ** *** **** **** * *
***** * * ** ***** * * ** **
* ** ****** ** 0;
}

void *** ***** number){
** *** * *** * * ** * ** **** ** * ******** *
* ** * *** * ** * ** * * ** * ** ** *
}

int * ** * *
* * ** * * * * ** * * x;
** * ***** *** * * * ******** *** * * &x);
* * * * * * *** * * x; * * * ***** *****
}
100/100 answered by (268 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include ** * * ***
#include ** *** **

int *** ** *
void *** * number);

int main(int argc, char *argv[])
{
* ** * * *
** * * * * a, b;
* **** * ** = * * *
* ** ** ***
*** * * ** **
** * * * * **
* * ** * ** 0;
}

void * * *** number){
* *** ** ** ** *** ** * * **** ** * * ** *** ** number);
* * *** * ***** ** * * *
}

int * * *
* * ******** * * * * x;
** * * * ** *** * *** * * * * * ** * ** *
** * * ** *** ***** ** ** x; * ** **
}
100/100 answered by (283 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include * * ***** *
* * * ** * * * *

int *****
void * number);

int main(int argc, char *argv[])
{
*** * * **
* * * * ***** a, b;
* * ** ** * * = *** *
*** ** * *
* * * * * *** * *

***** ***
* ** 0;
}

void ** * * *** number){
*** * * ** *** * **** ** ** * **** number);
* ***** * * ** *** * ****** * *
}

int ** * **
* *** * * ** ****** x;
** * ** * ** * * ******* ** * * * **** * * * * **
** ** *** * * ** * * ** *** *** * x; * * * * * *
}
100/100 answered by (220 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include * ** * * *** * *
#include ** * ** * *

int readNumber();
void * * ** * * number);

int main(int argc, char *argv[])
{
*** * *
** * * ** a;
**** * **
** * * ***
* * * ** * ** * * **** * * * * = * *****
* ** ** * * * *
* ** * **** **
**** * **** * ** * * *
 
********* **
**** * *
* **** * ***
* ** ** *** ** ** * ***
* ** * * * * * 0;
}

void * * ** number){
*** ** ** * * ** ***** ** * *** * ******* * * ** *** * ** *
* * * * * * * * * ** ** * **
}

int * ***
* **** * *** ** x;
* *** * ** ***** * **** * ** ** * * *** &x);
* ** * ** * ***** * x; *** ** *** * *** *
}
100/100 answered by (153 points)
edited by
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
\n is not necessary :)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
** ** * ****** * ** **
**** *** * *

/* run this *** ** using the *** pauser or add your own getch, * * *** ** or input loop */
int *** ****
void * ** *** ****

int ** * argc, char * ** {
*** *** * * * a;
* * * * * = ** ***
******* **

* * ****** ***** *

** * * * * * *** 0;
}
void **** ** *
*** * * * ** *** ***** * * *** * *** **
* ***** ** *** **** ** *
}

int *** * *** *
** * * * ***** ** * x;
*** ****** * * ** ******** * ** * ** ** * *
** * ** * * * ****** ** ** x; ** ** ** * ****
}
100/100 answered by (252 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.71.255.22
©2016-2025

Related questions

0 like 0 dislike
22 answers
[Exercise] Coding (C) - asked Dec 30, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
ID: 40236 - Available when: Unlimited - Due to: Unlimited
| 3.8k views
0 like 0 dislike
18 answers
[Exercise] Fill in the blank - asked Dec 23, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
ID: 39813 - Available when: Unlimited - Due to: Unlimited
| 1.6k views
12,783 questions
183,442 answers
172,219 comments
4,824 users