記得要用while (cin >> input) (或while(scanf("%d", &input))
想看答案的自己往下滑🔰🔰
#include<cstdio>
#include<string>
#include<iostream>
#include<stdlib.h>
using namespace std;
int main ()
{
int input;
while (cin >> input)
{
int i = 1;
while (i < input)
{
if(i % 7 != 0)
{
cout << i << " ";
}
i++;
}
cout << endl;
}
}