DEV Community

thequvonc
thequvonc

Posted on

karra jadvalini yaratish


#include <iostream>
using namespace std;
int main() {
int a;
  cin >> a;
  cout << a  << "*" << 1 << "=" << a * 1 << endl;  
  cout << a  << "*" << 2 << "=" << a * 2 << endl;  
  cout << a  << "*" << 3 << "=" << a * 3 << endl;  
  cout << a  << "*" << 4 << "=" << a * 4 << endl;  
  cout << a  << "*" << 5 << "=" << a * 5 << endl;
  cout << a  << "*" << 6 << "=" << a * 6 << endl;
  cout << a  << "*" << 7 << "=" << a * 7 << endl;
  cout << a  << "*" << 8 << "=" << a * 8 << endl; 
cout << a << "*" << 9 << "=" << a * 9 << endl ;


  return 0;
  }   

Enter fullscreen mode Exit fullscreen mode

bu codimizda bizga int sonni oqib olishimiz kerak!

cout << buyrugi bilan har bir 10 likgacha bilgan sonlarning kopaytiruv darajasi ( javobini ) kiritishimiz kerak

har bir qatorni alohida ajratishimiz uchun <<endl buyruginni kiritib olishimiz zarur!

boshida a buyrugini kiritgandim shuning uchun a ni har bir onlikgacha bolgan sonni osha a ga kopaytirib chiqishim kerak !

shuning bilan biz karra jadvalini yasashni organib oldik!

@dawroun

Top comments (0)