0
点赞
收藏
分享

微信扫一扫

P5712 【深基3.例4】Apples(python3 C++ Scratch实现)

乐百川 2022-02-08 阅读 30

【深基3.例4】Apples - 洛谷



C++代码:

/* 
P5712 【深基3.例4】Apples
https://www.luogu.com.cn/problem/P5712
*/
#include <bits/stdc++.h>
using namespace std;
int main( void )
{
	int x;
	
	cin>>x;
	
	if (x==0 || x==1)
	{
		printf("Today, I ate %d apple.",x);
	}
	else
	{
		printf("Today, I ate %d apples.",x);
	}
	
	return 0;
}
/*
作业:
P5703	【深基2.例5】苹果采购		
P5704	【深基2.例6】字母转换		
P5705	【深基2.例7】数字反转 
*/


Scratch2代码:

 

 



scratch3代码:

 

 

 

举报

相关推荐

0 条评论