c언어 기초반 연습문제
C
#include <stdio.h>
int main() {
int f1,f2;
// int n1,n2,result;
// scanf("%d %d", &n1,&n2);
// result = n1 - n2;
// if(result < 0){
// # result = result * -1;
// #printf("%d\n", result);
// scanf("%d %d", &f1 ,&f2);
// if( -1000 <= f1 && f1 <= 1000 && -1000 <= f2 && f2<= 1000){
// if(f1 < f2 ){
// printf("%d \n", f1);
// }else if (f1 > f2){
// printf("%d\n", f2);
// }else{
// return 0;
// }
// }
int k,n;
scanf("%d %d",&k ,&n);
for(int i=1;i<=n;i++){
printf("%d ", k);
k+=3;
}
}
Output
Embed on website
To embed this program on your website, copy the following code and paste it into your website's HTML:
Comments
This comment belongs to a banned user and is only visible to admins.
This comment belongs to a deleted user and is only visible to admins.