0 like 0 dislike
2.9k views

Question 8: Please a write a program that receives 2 integer numbers, then outputs numbers between those inputs. If the inputs are equal, write the input number instead.

*No space between the output numbers*

Input1

1 5

Output 1

12345

 

Input2

-3 3

Output2

-3-2-10123

 

Input3

5 5

Output3

5

 

[Exam] asked in Final examination by (5.9k points)
ID: 41942 - Available when: Unlimited - Due to: 2018-01-17 16:30

edited by | 2.9k views

30 Answers

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

int main(int argc, char *argv[])
{
* ** * *** * *** a,b,c;
***** * ** ** * *** * **** * ** * *** &a);
**** ***** ** * *** *** * ******* * &b);
* ** * * **** * * a<=b; a++){
** ***** **** ** ** *** ** * * * **** ** * *** * * ** ** * ** *** * *
** * * * **** ** *
** * ** ** * ** **
** * * * * ***** **** * * * * *** * **** *  
* **** ** ** *** 0;
}
* * * * * ** *
100/100 answered by (252 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 <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    int a,b;
***** * * * ****** * ** ** *** * , &a, &b);
    while(a<=b) {
* * * * ** * *** * * * * * **** * * ** * *** **** ***** * * ** **** *** *** *** **** ******* ** ,a);
*** * ***** *** * * * **** * * * *** ** ** * * **** * ***** *** ** * **** * **** * * ** *
** **** ** * * ** * * * * * * ** * * * **** ** * ** ** ** ** * * ** ** * * * * * * * *
** ****** *** ** ** * * ** *** *** * * ** * *** ** * ** *** *** * * ** * ** * *** * *** *
*** ** **** *** * * **** *** * ** *** ** *** * **** * * * ** *** *** *** ** * *** * * ** * ** * *
* **** *** * * *** ** ** *** * ** **** ** ** * * * * ** ** * * **** * ** ** * ** * ***
***** * * * * * * *** * * * * * * ***
    return 0;
} * * ****** ** * *** * ** *** * * *** * * *** * * * * * **
100/100 answered by (246 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 <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
  int a,b;
** **** * ****** * ** * ****** * ** ** * *
  while(a<=b){
***** * ** * * * *** **** ** * ***** ** * * ***** ** * * *** * *** * * ** ***** * * * ******** **** *
*** * ** ** * **** * ***** *** * ** ** * ** ** *** ** ** * ** ** * ***
* * * * ** * ** * **** *** * ** **** * ** * * ** * ** * ** * * *** ** ** * *** **
*** * * *** * * ** *** ** ** * ** * ** *** *** * * *** ** * ** **
** *** * ** ** ** ** ** * ***** ** * *** *** ** * *** ** ** **** * ** *** ** *
* ** ** *** ****** * * * * * ***** * * *** * * * * * * * * * ** **** *
** ** * * * ** *** * * *  
  return 0;
}
100/100 answered by (273 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: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    int a,b;
* ***** ** * ** * * * &a, &b);
** * * **** * *** ** *** {
***** ** *** * * *** * *** * * **** ** * ** *** **** ** **** * * printf("%d" ,a);
* * ** *** * * ** *** * * * ******** * * ****** **** ** * * * *** **** ** ** *** **** * *
*** ** ** * ** ******** * *** ** * * *** **** **** *** * *** * **** * ** * *** *
* ** * * * * * *** * * * ** * * * *** *** * * **** ** * * ** * * * ****
******* *** * * *** **** * ***** * ******** ** * ** * *** ** *** ** *** **** * **** * * ** *** *** ** * ** * * ,a);
*** *** ** **** * * * ***
** * * ** ** * *** * **** * * ** * ** *** ** **
    
    
* ** ***** * * *** * * * 0;
}   
* * *** * * * ** * * **** ** * ** ** ** **** *** * ** * ** * * **** **** * ** ** * ** * ** * ***** ***** * * ****** ** * ** * * ** * ** * ** ** * * ** * * * * ** *** * * * * ****
answered by (246 points)
0 0
prog.c: In function 'main':
prog.c:9:14: error: stray '\302' in program
              \xc2\xa1@ printf("%d" ,a);
              ^
prog.c:9:15: error: stray '\241' in program
              \xc2\xa1@ printf("%d" ,a);
               ^
prog.c:9:16: error: stray '@' in program
              \xc2\xa1@ printf("%d" ,a);
                ^
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
  int a,b;
** * *** * *** * * * * *** * * *
  while(a<=b){
*** ** * ****** ** ** * *** * ***** *** ** * * * **** * ** ******* **** **** * * ** * * *** *
* ** * * * * * * ** ***** ** * * * * ** * * ** * *** ** *** * * ** * ** *
* ** * ** * ** * * * * * * **** * * * * * ** *** * * * * ** ** * * ** * * ***
*** ** ** *** * **** *** * * ** ** * ** ** * * * * * * ** *** * **** ** * *** ** ***
*** *** * * * * *** ** *** ** * ** * * * * * * **** *** ** * * * ** **** ** * **** *
* * * * * * ** ***** * * ****** * ** * ** * * *** * * ** **** ** *** ** **
********* ** *** **** ** * * * ** * **  
  return 0;
}
answered by (273 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: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    int a,b;
***** * **** * * * * * ** * * * , &a, &b);
* ** * ** * * ** *** *** * ** {
* *** ** **** * * *** ** ***** *** ** ***** ***** ** * **** * * * * * * * * ** ** * * ,a);
*** **** ** ** *** * * * * ** *** ** ** * * * ** * * * ** ** **** * * *** *** *** *
* ** *** *** * * * *** * * ** ** * * ** * * * ** ** * * ** * ****** **** ** *
** * * ** *** * ** **** * * * *** * * * *** * * * ** ** * *** * ** ** *** *** *** ** * * ** *
* ** * ** * ***** **** * *** ** * ** *** * * ** ** *** * * * * * ** **** * * * ** ** ************ *
** *** * * ** * * * * ** *** * ***** ** * ***** * ** ** * * ** *** * * *
* * ** ** ****** * ******** * *** ******
    return 0;
}
100/100 answered by (183 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 <stdio.h>
#include <stdlib.h>


int main(int argc, char *argv[])
{
  int a,b;
*** * ** *** * * ** ** * ,&a,&b);
*** ** * ** * **** **
*** * * ** * ** * * ** ** * ** **** **** * ** ******** ** * ** * ****** * *** *
*** * * * ** ** * * * * * ***** *** *** * * * ****** * *** * ** ** * * ** * * * * ****
* ***** *** * * ** * * * ****** * * ** * * * **** * * * *
*** ** ****** * * ******* **** * * * ** * * * * * **** ***** * ** *** * * * **** * * * (a==b)
* *** ** * * * **** ***** ** * ********** ** * ***** **** *** ******* * ** *** ** * ****** * * * * * a);
  
  
** * * * * 0;
}
100/100 answered by (192 points)
edited by
0 0
prog.c: In function 'main':
prog.c:8:9: warning: too many arguments for format [-Wformat-extra-args]
   scanf("d%d" , &a, &b);
         ^~~~~
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 <stdio.h>
#include <stdlib.h>


int main(int argc, char *argv[]) {
***** * * ** * * * * ** * * a, b;
** * *** ** **
** * * *** * ***** ** * *** ** * * * * * * ***
* * *** ** * i=a-1;
* * * * **** * * ** * **
*** ** * *** * * * * * * * *** * * ** *** * * * * * * * *** * ** ** * ** * ** * ** * * * ***
** ** *** * ** * *** **
* * **** *** *** **** ** ** ** * ** * **** ** ***** * *** **
** ** * * * * * ** * * *** ** * *** ** * ********* ******* * ** * *** * *********** ** ** ** * * **** ** * ** *****
** ** * ** * * ** *** **** ** ***** * * *** *** ** * ** ** * * * * ** * **** ** **** * ****** * * * ** *
   
   
** * ** ** *** ** * *
    system("pause");
** ** * * * * ** * 0;
}
100/100 answered by (221 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 <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    int a,b;
* * ** * * ** * ** ** * * * * * * * , &a, &b);
****** ** * ** ** * **** {
****** ********** **** *** * * * *** *** * * *** * * * **** ***** * *** ** ** * ** ****** ** ** ,a);
* * * * ** ** ** * * ** * * *** * * ** * * *** * * ** * * ** *** *** * * ** * *** *
*** * * * * * ** * * **** ****** **** * ** * ** * * ** * ** * *** * *
**** * ***** ** ** *** * *** * *** * * * * ** * **** ** *** * * *** * ** ** ** * ****
*** * *** ******** * ** ** **** * **** * **** ** *** ** * * **** * *** ** **** * ** * *** ***** **** * ,a);
***** ** * * ** * * * *** ** ******* ** ** ** ******* ** *** * * * ** ** * * * * * ****
* ** * ** * *** * * * ** * * ** * * ** *
    return 0;
}
answered by (183 points)
0 0
prog.c: In function 'main':
prog.c:9:23: error: expected ';' before string constant
                 printf"%d" ,a);
                       ^~~~
prog.c:9:30: error: expected statement before ')' token
                 printf"%d" ,a);
                              ^
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    int a,b;
* * * *** ** ** * ** * ** ** * ** * , &a, &b);
* *** * *** * * *** * *** *** * ** {
****** ** ** ***** * ** * **** ** * **** ********* *** * * ** * * *** * * * * * * *** * * ,a);
**** **** * *** * ** **** ** *** **** * * ****** *** ** * * * * * *** ** ** * * ** * ********* ** ***
** * *** * ** * ** * ** ** ** * * * ** * * * * * * ** * * * *** * * ** *** * *
* * * *** ** ** ******** ** * * * ** * * ** ** * * ** * ***** * **** ** * * ** * ***** * * * * * ***
*** **** ** **** *** ** ** ** *** * * **** * * ** ** * * * ** * * * *** * ** * * *** * ***** * ** ** * ,a);
*** ** ** * ** **** * * * * * * ** * ** * * ** * * * * * * * ********* ** ** * *
* ** * * **** * ** **** ** * * * *******
    return 0;
}
answered by (183 points)
0 0
prog.c: In function 'main':
prog.c:9:23: error: expected ';' before string constant
                 printf"%d" ,a);
                       ^~~~
prog.c:9:30: error: expected statement before ')' token
                 printf"%d" ,a);
                              ^
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.58.42
©2016-2024

Related questions

0 like 0 dislike
22 answers
[Exam] asked Jan 13, 2018 in Final examination by nat236919 (5.9k points)
ID: 41975 - Available when: Unlimited - Due to: 2018-01-17 16:30
| 2.5k views
0 like 0 dislike
21 answers
[Exam] asked Jan 13, 2018 in Final examination by nat236919 (5.9k points)
ID: 41968 - Available when: Unlimited - Due to: Unlimited
| 2.6k views
0 like 0 dislike
26 answers
[Exam] asked Jan 13, 2018 in Final examination by nat236919 (5.9k points)
ID: 41937 - Available when: Unlimited - Due to: 2018-01-17 16:30
| 1.4k views
0 like 0 dislike
21 answers
[Exam] asked Jan 13, 2018 in Final examination by nat236919 (5.9k points)
ID: 41935 - Available when: Unlimited - Due to: 2018-01-17 16:30
| 1.1k views
0 like 0 dislike
23 answers
[Exam] asked Jan 13, 2018 in Final examination by nat236919 (5.9k points)
ID: 41926 - Available when: Unlimited - Due to: 2018-01-17 16:30
| 1.3k views
12,783 questions
183,443 answers
172,219 comments
4,824 users