c++(write a program to akd you to input a number of days then convert then convert into weeks?)how please ..and thx guys | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 3

c++(write a program to akd you to input a number of days then convert then convert into weeks?)how please ..and thx guys

9th Nov 2016, 6:07 PM
payman mohamad
payman mohamad - avatar
1 Resposta
+ 5
#include <iostream> using namespace std; int main() { int days= 0; int weeks = 1; cout<<"Enter days : "<<endl; cin>>days; weeks = days/7; if (days<7) { cout<<"The number of days is lower than 7" ; } cout<< weeks; return 0; }
9th Nov 2016, 6:40 PM
User3827