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

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

python3代码:

"""
P5712 【深基3.例4】Apples(python3实现)
https://www.luogu.com.cn/problem/P5712

"""
x=int( input() )

if x==0 or x==1:
            
            print("Today, I ate %d apple."%x)
            
else:
            print("Today, I ate %d apples."%x)




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代码:

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

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

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



scratch3代码:

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

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

 

上一篇:Android学习——AlarmManager系统服务


下一篇:NetCore,Web,定时任务